Home Download Buy Blog Forum Support

Breaks syntax highlighting

Breaks syntax highlighting

Postby Yaroslav on Mon Feb 27, 2012 8:38 pm

The syntax highlighting breaks for file corerror.h (in atachment).

Image
Attachments
corerror.rar
Archive with wrong syntax highlighting file corerror.h
(20.65 KiB) Downloaded 60 times
Yaroslav
 
Posts: 1
Joined: Mon Feb 27, 2012 8:23 pm

Re: Breaks syntax highlighting

Postby facelessuser on Sat Mar 03, 2012 3:52 pm

I have been going through my languages and fixing issues and making modifications on the languages I use the most. I have had this problem before, and I think I have a fix.

Go to line 210 of your Packages/C++/C.tmLanguage file and change this:
Code: Select all
<string>(?=(?://|/\*))|$</string>


to a negative lookahead:
Code: Select all
<string>(?!(?://|/\*))|$</string>


As you can see, it appears to now be highlighting fine.
Screen Shot 2012-03-03 at 8.49.46 AM.png
Screen Shot 2012-03-03 at 8.49.46 AM.png (195.53 KiB) Viewed 254 times


Thanks for posting the file, it made it much easier to get to the bottom of this.
facelessuser
 
Posts: 1565
Joined: Tue Apr 05, 2011 7:38 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 28 guests