-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Allow handlebar syntax errors in raw blocks #64
Conversation
Thanks, this is better approach for |
@@ -39,4 +13,49 @@ mod test { | |||
let r = handlebars.render("t0", &()); | |||
assert_eq!(r.ok().unwrap(), "a{{content}}{{else}}hello"); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this file and move these tests to template.rs because {{raw}}
is no longer a helper.
I'm not very familiar with the code, but how will this handle nested From reading over the code I believe that right now, if the parser encounters two consecutive opening raw tags (ie: I don't know what the desired / expected behaviour is, but I believe that either reporting an error or resuming normal parsing after the first |
That is true. I willl fix that! I have no idea what the expected behaviour is for "{{#raw}}{{#raw}}{{/raw}}{{/raw}}". |
Oh.. Seems handlebars has a new syntax for raw block in 4.0:
http://handlebarsjs.com/block_helpers.html#raw-blocks Overall, it's a new helper with syntax I suggest to implement this new syntax instead of maintaining our own. WDYT, @JoNil ? Let me know if you want to take the task otherwise I will start to think about it ;-) |
I don't have nearly enough time to work on it unfortunately :( |
@JoNil Thank you all the same, for this great patch that inspired me to improve the raw helper. I'm going to close this PR for now. And please let me know if I can help on anything about this library. Thanks! |
No description provided.