Skip to content

Commit 2fac673

Browse files
committed
support cpp special character
1 parent 383faf4 commit 2fac673

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

syntaxhighlighter3/scripts/shBrushCpp.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
this.regexList = [
7979
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
8080
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
81-
{ regex: /(R|L|U|u|u8)?"([^\\"\n]|\\.)*"/g, css: 'string' }, // special string
81+
{ regex: /(R|L|U|u|u8)?"([^\\"\n]|\\.)*"/g, css: 'string' }, // special character
82+
{ regex: /(R|L|U|u|u8)?'([^\\'\n]|\\.)*'/g, css: 'string' }, // special string
8283
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
8384
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
8485
{ regex: /^ *#.*/gm, css: 'preprocessor' },

0 commit comments

Comments
 (0)