jeff-hykin / better-cpp-syntax

💾 The source of VS Code's C++ syntax highlighting
GNU General Public License v3.0
155 stars 30 forks source link

Incorrect highlighting of comments following `#error`/`#warning` directives w/o message #611

Closed per1234 closed 1 year ago

per1234 commented 2 years ago

Inline comments following #error and #warning directives which do not include the optional message string are highlighted incorrectly.

Checklist

The code with a problem is:

#warning bar  // Coloration of comment is as expected
#warning  // Coloration of comment is NOT as expected
#error foo  // Coloration of comment is as expected
#error  // Coloration of comment is NOT as expected

It looks like:

Using "Dark+" theme:

image

It should look like:

Comments should be highlighted consistently regardless of whether or not the #error or #warning directive is followed by a message.

jeff-hykin commented 1 year ago

should now be fixed with v1.17.2