File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,8 @@ export default function(hljs) {
200200 } ) ,
201201 {
202202 className : 'symbol' ,
203- begin : / ' [ a - z A - Z _ ] [ a - z A - Z 0 - 9 _ ] * /
203+ // negative lookahead to avoid matching `'`
204+ begin : / ' [ a - z A - Z _ ] [ a - z A - Z 0 - 9 _ ] * (? ! ' ) /
204205 } ,
205206 {
206207 scope : 'string' ,
Original file line number Diff line number Diff line change 33<span class="hljs-string">'<span class="hljs-char escape_">\x</span>1A'</span>;
44<span class="hljs-string">'<span class="hljs-char escape_">\u</span>12AS'</span>;
55<span class="hljs-string">'<span class="hljs-char escape_">\U</span>1234ASDF'</span>;
6+ <span class="hljs-string">'😭'</span>;
67<span class="hljs-string">b'a'</span>;
78
89<span class="hljs-string">"hello"</span>;
1213<span class="hljs-string">r###"world"###</span>;
1314<span class="hljs-string">r##" "###
1415"# "##</span>;
16+ <span class="hljs-string">"😭😭😭😭"</span>;
1517
1618<span class="hljs-string">br" "</span>;
1719<span class="hljs-string">br#"hello"#</span>;
Original file line number Diff line number Diff line change 33'\x1A';
44'\u12AS';
55'\U1234ASDF';
6+ '😭';
67b'a';
78
89"hello";
@@ -12,6 +13,7 @@ r"hello";
1213r###"world"###;
1314r##" "###
1415"# "##;
16+ "😭😭😭😭";
1517
1618br" ";
1719br#"hello"#;
You can’t perform that action at this time.
0 commit comments