vuejs/vue-syntax-highlight

ST4114 incompatibility

deathaxe opened this issue · 1 comments

ST's HTML syntax had to change the way how CSS/JS syntax definitions are embedded within style and script tags in order to fix a core bug. It also requires changes to how those syntaxes are to be embedded. This change unfortunatelly effects all syntaxes, which inherit HTML.

Related PR: sublimehq/Packages#2831

This broke VUE syntax.

A short look at this package revealed the following lines to be obsolete or not needed at all.

script-javascript-content:
- match: (?=\S)
embed: scope:source.js
embed_scope: source.js.embedded.html
escape: '{{script_close_lookahead}}'

A backward compatible fix was to remove the context.

An inherited syntax needs to override script-javascript-content or style-css-content only, if it wants to embed a custom CSS/JS syntax (or scope), which is not the case here.


I'd suggest to take a look at...

https://github.com/sublimehq/Packages/blob/c70117be6402c54ccf860ab8edfcba8aade46c9e/ASP/HTML%20(ASP).sublime-syntax#L37-L67

This approach might be needed for all kinds of embedded script syntaxes to ensure toggle comment is working on the first and last line properly.

rchl commented

Can be closed now?

Thanks for fixing it @deathaxe btw!