I'm working on an AngluarJS web app in Sublime Text 3, and I need to be able to type boolean expressions inside certain directives, like ng-show
, ng-class
to define conditions for some display properties. Sublime sees the boolean operators as invalid and highlights them in pink (invalid syntax).
Here's an example:
<div ng-hide="line.valid && $index == 0"> ... </div>
In this example, the &&
gets highlighted pink because it shouldn't be present in HTML in Sublime's logic. Same goes for ||
.
Is there a way to edit the syntax highlighting file to keep invalid syntax highlighting on everything except boolean operators?
I've seen ways to change the color of the highlighting altogether, but I'd really like to just make Sublime realize that those operators are fine to use in HTML so I can still get that highlighting on other bad code.