handlebars-rust
handlebars-rust copied to clipboard
How to use square brackets when calling helper?
I can't figure out how to use square brackets to refer to a helper. While fuzzing, a template like {{[\0] ''}} failed and said there was no helper named \0 even though it was defined. However, when I used the same template and defined a helper named [\0], it worked.
Naming the helper \0 works in the Handlebars.js playground but naming it [\0] doesn't, so I'm not sure why the opposite is true for handlebars-rust.
Question
What am I doing wrong? I used handlebars.register_helper to register the helper. Is it supposed to be done some other way?
hmm.. this syntax is not supported by handlebars-rust. We will need special treatment for this [] syntax