Closed arechsteiner closed 8 years ago
Hey,
Sorry for taking ages to reply :(
Does this work if you don't use the Handlebars package?
I think this might need to be changed in the core HTML package as Handlebars is extending that one.
It's quite limited what you can do on top of existing language definitions, so the other alternative is having to reimplement / paste wholesale the HTML(5) package contents into Handlebars in order to be able to make these tweaks, which is of course a maintenance nightmare so I'm a bit reluctant to go more and more down that route.
That said, it might also be an extra twist that you're nesting this inside a Handlebars template, I'm not 100% sure if that's handled by ST or it would be necessary to duplicate and nest the language definition into itself for this to work.
Hi
Yes it works in HTML after I apply the fix. Here is my HTML.tmLanguage, line 286 and 287:
<!-- <string>(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)</string> -->
<string>(?:^\s+)?(<)((?i:script))\b(?!([^>]*text/x-handlebars-template[^>]*|[^>]*/>))</string>
(Note: the commented one is the original line, the other one is the fix)
I also added this in Handlebars.tmLanguage, line 506/507.
The result is that it works in .html files, but not in .hbs files.
I just had a look, and it seems Emmet is working within script tags, at least a text selection one I tried does.
Can you please confirm @arechsteiner if it works for you now? If not, can you please let me know what Emmet functionality you're trying to use?
@daaain I've since switched to Vim, so I'm not using this plug-in any more.
Oh well, in that case I'm definitely closing this issue down :)
Thanks for the heads up!
I have the following template within a server side handlebars template,
index.hbs
:While syntax highlighting works, Emmet doesn't. I'm not sure how to make it work. I've tried this solution on handlebars.tmlanguage:
http://www.sublimetext.com/forum/viewtopic.php?f=2&t=4057
To no avail, unfortunately.
Note: I'm using Handlebars both on the server (via express-hbs) as well as on the front end with Backbone, hence a Handlebars template within a Handlebars template :)