Reputation: 1892
Im using sublime to edit html5 docs. But when I started to do quote-free editing like:
<div id=asdf>
instead of
<div id="asdf">
its syntax highlight gone crazy.
Any ideas how to solve this? Is there other up to date parser for sublime?
ty
Upvotes: 5
Views: 4697
Reputation: 780
This Sublime Text thread suggests a way to fix it: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=8129
Open up your HTML.tmLanguage (in ~/.config/sublime-text-2/Packages/HTML) and look for this:
<string>(?<='|")</string>
<key>name</key>
<string>meta.attribute-with-value.id.html</string>
Change the first line to
<string>(?<==|='|=")</string>
Your unquoted values won't be highlighted in the same way that quoted values are highlighted, but it will at least prevent the syntax highlighting from completely breaking.
Upvotes: 5
Reputation: 458
I have to go with Dbugger on this one. I feel compelled not to assist in helping you configure Sublime to "not report" bad HTML practices. With that said, the answer to your question is- typing in the quotations will eliminate the weird highlighting in Sublime.
Upvotes: -1
Reputation: 25307
Quote free html is not a good idea. I recommend you to use quotes. The bytes you will save are not worth the aggravation is going to cost you.
Upvotes: 3