Home Download Buy Blog Forum Support

ST3 3033 C++ syntax highlighting bug (rest of file = string)

ST3 3033 C++ syntax highlighting bug (rest of file = string)

Postby mjau on Mon May 13, 2013 3:02 am

In C++ syntax, the following line doesn't enter string highlighting mode at the start of the string, but at the end. The rest of the file is highlighted as a string, except for strings which are highlighted as code:
Code: Select all
a() + "#"

It only happens when this pattern occurs at global scope, not in a function. It can happen naturally in a constructor initializer (or macro definition, etc):
Code: Select all
Foo::Foo () : foo(bar() + "#") { ... }
#define foo bar() + "#"

The # can be replaced with other things for different effects. E.g. "/*" will start a block comment.

Sublime 3 3033 (Linux)
mjau
 
Posts: 3
Joined: Mon May 13, 2013 2:37 am

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Majestic-12 [Bot] and 22 guests