You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, Handlebars.java doesn't allow a partial to call itself (directly or indirectly).
This does not seem to be true for inline partials.
new Handlebars().compileInline("{{#*inline \"myPartial\"}}{{> myPartial}}{{/inline}}{{> myPartial}}").apply("");
produces the following exception:
Exception in thread "main" java.lang.StackOverflowError
at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:114)
at com.github.jknack.handlebars.internal.Partial.merge(Partial.java:148)
at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:126)
at com.github.jknack.handlebars.internal.TemplateList.merge(TemplateList.java:95)
at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:126)
at com.github.jknack.handlebars.internal.Partial.merge(Partial.java:228)
at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:126)
at com.github.jknack.handlebars.internal.TemplateList.merge(TemplateList.java:95)
at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:126)
at com.github.jknack.handlebars.internal.Partial.merge(Partial.java:228)
Can inline partials also be made subject to the Handlebars.inifiteLoops(true) flag?
The text was updated successfully, but these errors were encountered:
In the README.md it states that
This does not seem to be true for inline partials.
produces the following exception:
Can inline partials also be made subject to the
Handlebars.inifiteLoops(true)
flag?The text was updated successfully, but these errors were encountered: