Closed agentgt closed 11 months ago
Wontache produces the empty string because it interprets the whole template as a single interpolation tag with }}hello{{
as the key. This playground savestate demonstrates it:
{"data":{"text":"{\n '}}hello{{': 'x'\n}"},"templates":[{"name":"","text":"{{}}hello{{}}"}]}
Not meaning to defend the behavior though, just clarifying.
I see no use in empty tags, so I don't think it needs specifying, but I'll leave this open for a while so different opinions can be heard.
mine leaves them alone, both the empty and blank names
{{}}hello{{}}
=> {{}}hello{{}}
{{ }}hello{{}}
=> {{ }}hello{{}}
Consider the case:
I found a lot of varying behavior in mustache implementations.
hello
. The empty tags appear to be ignored.Perhaps it is out of scope for the spec to dictate what happens on empty tags? That being said I do think Wontache's behavior is incorrect regardless.