Sublime Forum

Syntax highlighting fails part way through coding

#1

I’m getting weird JavaScript syntax highlighting while coding. It looks like an unmatched quote in a way.
Colors start to change for the same elements at the same level. It seems to alternate between lines. Any clue as to how to fix this?


You can see this at the line with the pink tail… line 20.

Thanks in advance for the help!

0 Likes

#2

My first guess would be that you’re using the default JavaScript syntax to highlight the files, but since they’re React files the syntax doesn’t match. If that’s the case, JSCustom or Babel may help.

1 Like

#3

That’s definitely it. You can see that the highlighting starts to go wrong on line 14, when the first JSX tag is encountered.

As the author of JS Custom, I second that recommendation. :slight_smile:

0 Likes

#4

Awesome, thanks guys. That resolved the issue. Installed JSCustom and figured out how to activate it for the file. Corrected the highlighting right away.

Appreciate the advice.

0 Likes