Closed jabley closed 10 months ago
Is it possible to write any formal grammar, when the language has a "change delimiters tag" which has the following templates render the same: {{name}}
and {{=<% %>=}}<%name%>
?
Since you're in the process of implementing, I recommend you read https://github.com/mustache/spec/issues/67. When the spec falls short, at least you have a few sensible implementations to take inspiration from.
(BTW, I'm not a spec maintainer, just a mustache implementor)
The current definition:
That would imply that
{{content}}
is legal, but{{ content }}
is not legal.However, later tests state “Superfluous in-tag whitespace should be ignored.” and include tests for
{{ string }}
.This change attempts to make that clearer and consistent everywhere.
Possibly a BNF or similar grammar would be helpful?