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

Partial block behavior differences from original implementation #570

Closed
garyemerson opened this issue Apr 11, 2023 · 1 comment · Fixed by #571
Closed

Partial block behavior differences from original implementation #570

garyemerson opened this issue Apr 11, 2023 · 1 comment · Fixed by #571

Comments

@garyemerson
Copy link

(Thanks for writing this library btw! I'm starting to use it quite a lot on my website.)

I found a behavior difference compared with the original javascript implementation. With the original implementation, using a partial that doesn't exist will cause an error. Also, using a partial before its definition works fine.

With handlebars-rust, using a partial that doesn't exist will silently render as empty (even in strict mode). Using a partial before its definition will also silently render as empty.

Here's an example template that showcases these behaviors (javascript implementation playground link):

before
{{> foo}}
{{> bar}}
after

{{#*inline "foo"}}
foo
{{/inline}}
@garyemerson garyemerson changed the title Partial blocks before definition render as empty Partial block behavior differences from original implementation Apr 11, 2023
@sunng87
Copy link
Owner

sunng87 commented Apr 12, 2023

Thank you @garyemerson I will look into this issue later today. If there is a difference we will align behaviour with original javascript version

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

Successfully merging a pull request may close this issue.

2 participants