We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
handlebars.js allow for escaping a quote with a backslash: (from handlebars.l)
<mu>'"'("\\"["]|[^"])*'"' { yytext = yytext.substr(1,yyleng-2).replace(/\\"/g,'"'); return 'STRING'; }
but if I try this template I get a compile error:
{{#each a="1\"2"}}{{/each}}
The text was updated successfully, but these errors were encountered:
This hack to Parser.java seem to work, but I'm a parboiled noob so there may be better solutions:
@Label("string") Rule string(final Var<Object> value) { return Sequence(stringLiteral(), value.set(match().replace("\\\"", "\""))); } @Label("string") Rule stringLiteral() { return Sequence('"', ZeroOrMore( FirstOf( String("\\\""), Sequence(TestNot(AnyOf("\"\r\n")), ANY))), '"'); }
Sorry, something went wrong.
Seems to be a valid solution, can you send a pull request?
I'll write a unit test later.
Thank you.
Allow " (qoute) in hash string param #29
7ee711e
jknack
No branches or pull requests
handlebars.js allow for escaping a quote with a backslash: (from handlebars.l)
but if I try this template I get a compile error:
The text was updated successfully, but these errors were encountered: