Support for HTML Custom Tag Variables
Hi all,
we use Handlebars as template language and have also variables for some tags:
<{{headlineTag}} class="xyz">{{headline}}</{{headlineTag}}>
The IDE is confused and many things break, e.g. the indenting/reformatting and checking for closing tags in the whole file.
Adding those tags as "Custom HTML tags" in the Inspections dialog did not help. Does anyone know a solution to this problem?
Thank you!
Sebastian
Please sign in to leave a comment.
To me, no errors are reported for such syntax:
are your files treated as handlebars by IDE?
Hi Elena,
thanks for your feedback. Yes, the tag itself is working.
But as soon you have a more complex structure around, the mentioned problems appear (problems with indenting/reformatting and checking for closing tags)
Best regards,
Sebastian
I see. I'm not aware of any solutions:( As tags are matched by name, dynamically generated names may indeed break it
Well, the simplest solution would enable adding custom tags with special chars ("{{headlineTag}}").
This does actually work, but only for auto-completition. The other listed features do not work or even break.
but these are not valid HTML tags...
Well, actually I use the "Handlebar/Mustache" Plugin. Maybe it's possible to add such a support in the plugin?
I thought I can solve it with "Editor > Unknown HTML tags > Custom HTML Tags"...
I created https://youtrack.jetbrains.com/issue/WEB-25211, please feel free to vote for it
Thank you!