You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to handlebars.java
I have a UI which allows people to test emails based on templates. Part of the UI uses 'var tokens = Mustache.parse(template_text)' to create a list of tokens, which I filter out nodes of type 'name'. Then I display those names with input fields so the user can supply values.
I have an equivalent method in the java backend that uses 'Template template = handlebars.compileInline(text); template.collect();' to find all the tags in a template as well.
I have recently added support for partials and realized that template.collect() does not 'drill into' the partials and return those tags. I have not tested Mustache.parse() with templets containing partials yet. I was wondering what is the expected behavior of javascript Mustache.parse() and JAVA template.collect() with regard to partials. Is there a way to compute all the tags in nested templates using the the Mustache engine?