handlebars.java icon indicating copy to clipboard operation
handlebars.java copied to clipboard

Dot usage in templates with custom delimiter

Open adboyarshinov opened this issue 3 years ago • 0 comments

Hello Running this code:

        handlebars.setStartDelimiter("${");
        handlebars.setEndDelimiter("}$");
        Template template = handlebars.compileInline("${var1}$. ${var2}$");
        HashMap<String, String> context = new HashMap<>();
        context.put("var1","val1");
        context.put("var2","val2");
        String text = template.apply(context);
        System.out.println(text);

fails with error:

com.github.jknack.handlebars.HandlebarsException: inline@63cfbdfd:1:11: found: '{'
${var1}$. ${var2}$
-----------^

But it works with standart delimiter.

Is it bug, or I just not using custom delimiters properly?

adboyarshinov avatar Jun 02 '22 09:06 adboyarshinov