Regardless whether it's a good approach or not:
Is there any way to make Sublime Text able to highlight HTML syntax for unquoted attributes? i.e
<div class=foo data-label=bar>
I have managed to fix the issue which causes unquoted id
attributes to break the syntax across the document by following these instructions.
However this still not allowing syntax highlighting for unquoted attributes which is what I am after.
Any ideas?
The reason unquoted attribute value syntax highlighting is not working is because Sublime is looking for a quoted string. Without quotes, none of the string regexes match. To work around this, you'll have to add a new scope entity.other.attribute-value.html
that is included in meta.tag
, begins matching at an =
, matches [0-9a-zA-Z-_]
one or more times, and stops matching at whitespace or >
. You can then add this new scope to your color scheme and highlight it appropriately.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With