lang: ast, interpolate: Pass through uninterpolated strings

We don't need to make a new reference for nothing.
This commit is contained in:
James Shubin
2025-06-06 00:35:52 -04:00
parent 4f977dbe57
commit 5d44cd28db
2 changed files with 17 additions and 11 deletions

View File

@@ -7527,7 +7527,8 @@ func (obj *ExprStr) Interpolate() (interfaces.Expr, error) {
if err != nil {
return nil, err
}
if result == nil {
// a nil result means unchanged, string didn't need interpolating done
if result == nil { // we still copy since Interpolate always "copies"
return &ExprStr{
Textarea: obj.Textarea,
data: obj.data,