Closed yateam closed 6 years ago
💠The edge cases (so many edge cases) are what made me finally stop looking for a direct fix for #44 and instead inject a Map<String, String>
which provided the desired behavior in specific controllable cases. This pull request doesn't include any tests or a specification for the behavior of StringTemplate with a renderer registered for String
.
I mentioned a couple of the edge cases in the original issue. Here are a few more:
key
might or might not be the same as other values.That is sad. The template engine intended to help a lot while rendering HTML does not address html-escape at all.
String Attribute Renderer called for all text - not just attributes #44
Distinguish cases when the interpreter handles static template text and dynamic attributes.
NOTE: could you consider this as a fix for this issue: https://github.com/antlr/stringtemplate4/issues/44