Mass Red Highlight Issue


Hi all,

I’ve tried searching and doing some of the suggested tips but am not sure those tips were for my problem or not. I went to open my project a few days ago and noticed a ton of my project was not highlighted in red. It starts at a seemingly random point and from that point about 80% of the code on the page is highlighted. It’s only this one document too. The rest of the files in the project seem to be unaffected. Any idea what could be causing this?


It’s not random. The highlight starts after a ' character. This probably means that some package is expecting every unescaped ' to be closed with another one. You can test this by placing another ' on the same line as the first.

What language does Atom say the file is? The language appears on the right-hand side of the status bar. Please also share a list of the community packages you have installed (you can find them in Atom, or by going into the command line and using apm ls).


That would make sense and also appears to be what is happening. It starts and ends at every apostrophe. Atom correctly identifies the language as HTML.

I have atom-beautify, tool-bar, tool-bar-main and tool-bar-almighty installed. Tool-bar-main is disabled, though.


I’m going to guess you have some embedded <style> tags further up the file?


I do not. I have a separate file for my CSS


Can you upload the whole file so that we can take a look at it?


I’ve never used this site to share files so hopefully this is kosher:


Also please ignore the actual content of the page and how random it is. It’s basically a dummy page for practicing various new concepts I’m learning in my HTML5 class lol. It’s not supposed to be pretty or make sense.


I opened it in my Atom and am seeing no highlighting at all.


Interesting… So maybe there’s an issue with my app rather than with my code… hmm


Anyone found a fix? also having this issue.


Please provide more information. We need to see what you’re seeing. The more data we collect about when and where this happens, the better a chance we have of figuring out what’s up.


seems to have suddenly highlighted. finished work on this file a few months back with no issues like this but i came back to it for reasons and this is what i found. list of community addons


It’s really weird that the highlight stops in the middle of the sentence. Since I can’t see the full width of the lines, can you confirm that the only single-quotes are the ones around the lines? Does it appear if you try to assign each of those values individually? You can try breaking it apart like this:

var textArray[0] = '...'
var textArray[1] = '...'
var textArray[2] = '...'
var textArray[3] = '...'
split this topic #15

11 posts were split to a new topic: Incorrect syntax highlighting in an ASCII document


Weird that this happens inside of html text areas… Seems like it would be ignored if inside a paragraph tag, etc.


Not sure if you have resolved this, but I was seeing some similar highlighting. It had to do with code coverage, and an installed package was highlighting all the functions not covered by unit tests. They’re probably unrelated since your highlighting starts after a quote, but maybe this can help someone else :slight_smile:

1 Like

I had this problem too: a red background between single quotes and my page was identified as HTML in the status bar.

What I did to (accidentally) resolve this was click HTML in the status bar which brought up the Command Palette. Even though HTML was ticked in the list of docs displayed by the Command Palette, when I clicked HTMl again, the red background disappeared.


That’s actually the grammar picker. The confusion here stems from the fact that both features use a modal panel created with atom-select-list, so they have the same UI features.