Good morning.
How can I remove the highlighting to the “%” character in html?
Thank you.
Highlighting character %
Are you talking about the ampersand or the percent symbol?
the ampersand is highlighted because it triggers invalid.illegal.bad-ampersand.html scope in HTML.tmLanguage, using unescaped ampersand (also for querystring in links) should be avoided as it’s formally an error in html.
I said just the symbol “%”.
Is there a way to fix this thing?
It is an error in the html codece?
So i centered the point in my previews answer.
The & (ampersand), should be used escaped in html, even into link’s querystrings, so it’s better to write & instead of the simple &.
Although is commonly used unescaped, as a matter of fact it works in both ways, it’s a formal error in html specs not to use the html entity for it, and ST is doing well highlighting it.
This gives you 3 options:
- just ignore it (like i do),
- use & in your code,
- tweak/change html.tmlanguage