Browse Source

fix c++ comment continuation highlighting #2497

nreed 4 years ago
parent
commit
7b96ed2fbd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/cpp/cpp.ts

+ 2 - 0
src/cpp/cpp.ts

@@ -347,10 +347,12 @@ export const language = <languages.IMonarchLanguage>{
 			[/[ \t\r\n]+/, ''],
 			[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
 			[/\/\*/, 'comment', '@comment'],
+			[/\/\/.*\\$/, 'comment', '@comment'],
 			[/\/\/.*$/, 'comment']
 		],
 
 		comment: [
+			[/.*[^\\]$/, 'comment', '@pop'],
 			[/[^\/*]+/, 'comment'],
 			[/\*\//, 'comment', '@pop'],
 			[/[\/*]/, 'comment']