jknack / handlebars.java

Logic-less and semantic Mustache templates with Java
http://jknack.github.io/handlebars.java
Other
1.46k stars 381 forks source link

Expressions cannot start with a number? #581

Open enorm opened 7 years ago

enorm commented 7 years ago

Hi,

I cannot compile templates that contain expressions that start with a number like {{ 1 }} or {{ 128T }}. But native Handlebars.js seems to support this.

Minimal code example:

Handlebars handlebars = new Handlebars();
try {
    handlebars.compileInline("{{ 1 }}"); // throws HandlebarsException
} catch (IOException e) {
    // Should not happen
}

I am using version 4.0.6.

This issue might be similar to #573 .

Best regards, Norman

jknack commented 6 years ago

I'm afraid it is not an easy fix, will leave it open