浏览代码

fix c++ comment continuation highlighting #2497

nreed 4 年之前
父节点
当前提交
7b96ed2fbd
共有 1 个文件被更改,包括 2 次插入0 次删除
  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']