File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ CAVEATS / POTENTIALLY BREAKING CHANGES
77
88Core Grammars:
99
10+ - fix(rust) - adds emoji support in single quote strings [ joshgoebel] [ ]
1011- fix(apache) - support line continuation via ` \ ` [ Josh Goebel] [ ]
1112- fix(makefile) - allow strings inside ` $() ` expressions [ aneesh98] [ ]
1213- enh(arcade) updated to ArcGIS Arcade version 1.29 [ Kristian Ekenes] [ ]
Original file line number Diff line number Diff line change @@ -199,10 +199,19 @@ export default function(hljs) {
199199 illegal : null
200200 } ) ,
201201 {
202- className : 'string' ,
202+ scope : 'string' ,
203203 variants : [
204204 { begin : / b ? r ( # * ) " ( .| \n ) * ?" \1(? ! # ) / } ,
205- { begin : / b ? ' \\ ? ( x \w { 2 } | u \w { 4 } | U \w { 8 } | .) ' / }
205+ {
206+ begin : / b ? ' / ,
207+ end : / ' / ,
208+ contains : [
209+ {
210+ scope : "char.escape" ,
211+ match : / \\ ( \w | x \w { 2 } | u \w { 4 } | U \w { 8 } ) /
212+ }
213+ ]
214+ }
206215 ]
207216 } ,
208217 {
Original file line number Diff line number Diff line change 11<span class="hljs-string">'a'</span>;
2- <span class="hljs-string">'\n '</span>;
3- <span class="hljs-string">'\x1A '</span>;
4- <span class="hljs-string">'\u12AS '</span>;
5- <span class="hljs-string">'\U1234ASDF '</span>;
2+ <span class="hljs-string">'<span class="hljs-char escape_">\n</span> '</span>;
3+ <span class="hljs-string">'<span class="hljs-char escape_">\x</span>1A '</span>;
4+ <span class="hljs-string">'<span class="hljs-char escape_">\u</span>12AS '</span>;
5+ <span class="hljs-string">'<span class="hljs-char escape_">\U</span>1234ASDF '</span>;
66<span class="hljs-string">b'a'</span>;
77
88<span class="hljs-string">"hello"</span>;
You can’t perform that action at this time.
0 commit comments