Skip to content

Commit

Permalink
Add include helper to HandlebarsUtil
Browse files Browse the repository at this point in the history
This can now be supported after fixing the premature base url
handling and adding a lib:// based template loader.
  • Loading branch information
fishface60 committed Sep 13, 2024
1 parent bea5d52 commit 4e6abc5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/rptools/maptool/util/HandlebarsUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.github.jknack.handlebars.context.JavaBeanValueResolver;
import com.github.jknack.handlebars.helper.AssignHelper;
import com.github.jknack.handlebars.helper.ConditionalHelpers;
import com.github.jknack.handlebars.helper.IncludeHelper;
import com.github.jknack.handlebars.helper.NumberHelper;
import com.github.jknack.handlebars.helper.StringHelpers;
import com.github.jknack.handlebars.io.ClassPathTemplateLoader;
Expand Down Expand Up @@ -109,6 +110,7 @@ private HandlebarsUtil(String stringTemplate, TemplateLoader loader) throws IOEx
.forEach(h -> handlebars.registerHelper(h.name(), h));
NumberHelper.register(handlebars);
handlebars.registerHelper(AssignHelper.NAME, AssignHelper.INSTANCE);
handlebars.registerHelper(IncludeHelper.NAME, IncludeHelper.INSTANCE);

template = handlebars.compileInline(stringTemplate);
} catch (IOException e) {
Expand Down

0 comments on commit 4e6abc5

Please sign in to comment.