PavelTorgashov / FastColoredTextBox

Fast Colored TextBox for Syntax Highlighting. The text editor component for .NET.
Other
1.21k stars 463 forks source link

VB Highlighter - problem with comments #226

Open bmaster001 opened 3 years ago

bmaster001 commented 3 years ago

There are some issues with the VB-language highlighter. I suck as regex, so I hope someone can help me with this.

The single quote (') character should highlight the rest of the line as comment, but it looks like the double quote (string delimiter) is processed afterwards and colors the string as string instead:

image

Also when there's a single quote inside a string, it doesn't really work as it should (the second line should be colored like the third line):

image

I tried playing with the TextChanged event and SetStyle... but that only makes it worse :-)