You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to look at the behaviour and understand the consequences better. The problem I see is that something like this is possible (and maybe commonly used?)
foo = 1;
t = StringTemplate["a is <*foo*>"];
TemplateApply[t]
Block[{foo = 2},
TemplateApply[t]
]
Since I don't see the variable inside the template in the Block and cannot make a valid reference, renaming foo would break the code. But maybe this is not an issue.
What I can try is to extract the portion inside <*..*> and make it act as it would be normal code. It's completely similar to Kotlin's string injection and I'm sure I would find how this can be implemented.
It would be nice if renaming worked in this situation:
foo
appears in the string as well, between the<*
...*>
expression delimiters. When renaming this symbol, it should also be renamed in the string.Of course, this should be low priority.
Also, StringTemplate allows specifying non-default expression delimiters, so renaming couldn't possibly work in every situation.
The text was updated successfully, but these errors were encountered: