I'm making a tool that uses handlebars expressions/templates. The idea is for the user to specify a default value for each of the expressions in the template. What i'd like to have is an array of all the expressions in a certain html.
for ex:
<div style="display:none;font-size:1px;color:#e9e9e9;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">
{{striptags INTRO}}
</div>
{{INTRO}}
<br />
{{BODY}}
{{#if UNSUBSECRET}}
<div> you can unsub...</div>
{{/if}}
The array then would be:
- INTRO
- BODY
- UNSUBSECRET
Regex would be an option because I won't support any new helpers, but isn't there simply a way to get them all from the nodejs lib?