wbond / pybars3

Handlebars.js template support for Python 3 and 2
GNU Lesser General Public License v3.0
179 stars 46 forks source link

Support Partials blocks #72

Open chrislondon opened 3 years ago

chrislondon commented 3 years ago

HandlebarsJS has support for partials blocks. An example would be:

myPartial:

<div>
    {{> @partial-block }}
</div>

template:

{{> myPartial }}
  <p>Some content here</p>
{{/myPartial}}

Would render:

<div>
    <p>Some content here</p>
</div>

When I try doing this I get the error: pybars._compiler.PybarsError: Error at character 25 of line 34 near {{/myPartial}}

I assume the reason I'm getting the error is because this isn't supported yet?