Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scan until right tag with "{{{VAR}}}" #116

Open
jverzani opened this issue May 27, 2020 · 1 comment
Open

scan until right tag with "{{{VAR}}}" #116

jverzani opened this issue May 27, 2020 · 1 comment

Comments

@jverzani
Copy link
Owner

In closinig issue #114, it was seen that the scanning the above for a closing tag "}}" seems to find the first pair, no the last. This leaves the token "{VAR" which works for what is desired. It should probably leave the token as "{VAR}" though. There might be an edge case that exposes the difference. For now, will leave this issue as a reminder.

@jverzani
Copy link
Owner Author

Here are two incorrectly parsed things:

julia> Mustache.parse("{{{variable}} stuff")
Mustache.MustacheTokens(Mustache.Token[Mustache.TextToken("text", ""), Mustache.TagToken("{", "variable", "{{", "}}", ""), Mustache.TextToken("text", " stuff")])

julia> Mustache.parse("[[{variable]] stuff", ("[[","]]"))
Mustache.MustacheTokens(Mustache.Token[Mustache.TextToken("text", ""), Mustache.TagToken("{", "variable", "[[", "]]", ""), Mustache.TextToken("text", " stuff")])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant