Strange bug - The word 'Peru' gets highlighted


#1

So I was browsing through a list of countries in a JSON file and noticed the word ‘Peru’ was highlighted. Thought this was strange so I typed it into my open JavaScript file and bam, it’s also highlighted. I can’t think of any of my installed packages that would cause this to happen and it really doesn’t break anything. It’s just… strange…

It doesn’t seem to matter which filetype I’m working with (even an unsaved new file) or which syntax highlighting I’m using.

wat


#2

Now that’s fascinating.

Have you tried switching the theme and see if that still happens?

Otherwise, there must be a package that highlights something and has some weird grammar issue here.


#3

Theme doesn’t change anything and it happens in an unsaved file so none of the language packages would affect it I don’t think.


#4

Start Atom in safe mode and see if the problem persists; atom --safe


#5

No highlighting. Must be a 3rd party package. But which one…


#6

I strongly suspect it is one of the color highlighting packages, perhaps atom-color-highlight?

http://www.w3schools.com/tags/ref_color_tryit.asp?color=Peru
http://www.impressivewebs.com/weird-css-color-names/


#7

Wow that’s exactly it. I’m totally forgot I had it installed. Thanks!


#8

Yeah peru is a color name from the svg set, if you use atom-color-highlight you can disable the display of colors in strings and comments.

It make me think that it could be useful to have an exclude filter for grammars, for markdown files for instance.


#9

I would check by scope, that makes it so that your users don’t have to try to remember all the myriad extensions that people can add to a particular file type.