I want to know the name of the parameters that are in a template without having the helpers, I can't seem to find from neither Handlebars
nor Template
a natural way to do this. I had to do it manually but maybe I am missing how to do it?
Handlebars hb = newHandlebars();
Template template = hb.compileInline(input);
Set<String> variableNames = new HashSet<String>(template.collectReferenceParameters());
List<String> tagNames = template.collect(TagType.values());
for (String tagName : tagNames) {
if (hb.helper(tagName) == null) {
variableNames.add(tagName);
}
}