You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
I took a look at this and noticed that this styling of the orange background with the pink foreground is reserved just to indicate invalid/illegal characters. Here is where that's defined:
I replicated this behavior with an HTML file, and the problem isn't ampersand specific, it's because of the encoding error with double ampersands, see this message. Here's a good post about ambiguous ampersands ,
That's not to say that the orange background with the hot pink foreground is necessarily the most ideal way to display it either. However, if this is intentional it could be because if there are invalid/illegal characters in a file it's likely to cause an error that breaks things, web browsers just handle most unencoded ampersands/ambiguous ampersands gracefully, so maybe making the invalid characters look like that makes them standout because it's impossible to scan over so it makes the user click on it to see what's happening and then potentially fix the invalid characters.
To stop this from happening I recommend encoding your ampersands, &. I use the HTML5 Sublime Package, there are lots of great tab completions for characters that should be encoded, so just typing the ampersand followed by a tab creates the encoded & and avoids the invalid/illegal syntax highlighting.
I'm sorry if you already knew all of this, but this was driving me up a wall so I figured if anyone else searches for the problem it might be handy to have it documented here. ✨
Using the dark theme. And by "Out of focus" I mean the cursor is not on the ampersand.
Out of focus
In focus
The text was updated successfully, but these errors were encountered: