nesting {{helper name}} within {} causes parsing error
Closed this issue · 6 comments
G'day mate! Thanks for the insanely useful plugin, its awesome!
However I can't get the pascalHelper to add my filename as my CSS class name (CSS Modules), have pictured below. Any suggestions, did I miss something obvious? Appears to be an issue with nesting the helper moustache within another set of curly braces?
Cheers,
Mick
Hmmm, okay, it works with a space added after the helper moustache:
<div className={ styles.{{pascalCase name}} }>
I can live with that :)
A suggestion! How about allowing use of VSCode user snippets in the template files? e.g. provide a placeholder for snippet names in the templates: {{snippetName: blahblah}}. That way the templates could be made as snippets including the curser positioning functions etc...
Here's the solution: http://handlebarsjs.com/expressions.html#whitespace-control
<div className={styles.{{pascalCase name~}} }>
☝️ should do it. The ~ tells it to remove the whitespace the tag is replaced! Gonna close this out.