Skip to content

Partial block behavior differences from original implementation #570

@garyemerson

Description

@garyemerson

(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}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions