|
1214 | 1214 | 'name': 'string.quoted.single.js' |
1215 | 1215 | 'patterns': [ |
1216 | 1216 | { |
1217 | | - 'match': '\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' |
1218 | | - 'name': 'constant.character.escape.js' |
| 1217 | + 'include': '#string_escapes' |
1219 | 1218 | } |
1220 | 1219 | { |
1221 | 1220 | 'match': "[^']*[^\\n\\r'\\\\]$" |
|
1235 | 1234 | 'name': 'string.quoted.double.js' |
1236 | 1235 | 'patterns': [ |
1237 | 1236 | { |
1238 | | - 'match': '\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' |
1239 | | - 'name': 'constant.character.escape.js' |
| 1237 | + 'include': '#string_escapes' |
1240 | 1238 | } |
1241 | 1239 | { |
1242 | 1240 | 'match': '[^"]*[^\\n\\r"\\\\]$' |
|
1258 | 1256 | 'name': 'string.quoted.template.html.js' |
1259 | 1257 | 'patterns': [ |
1260 | 1258 | { |
1261 | | - 'match': '\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' |
1262 | | - 'name': 'constant.character.escape.js' |
| 1259 | + 'include': '#string_escapes' |
1263 | 1260 | } |
1264 | 1261 | { |
1265 | 1262 | 'include': '#interpolated_js' |
|
1283 | 1280 | 'name': 'string.quoted.template.graphql.js' |
1284 | 1281 | 'patterns': [ |
1285 | 1282 | { |
1286 | | - 'match': '\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' |
1287 | | - 'name': 'constant.character.escape.js' |
| 1283 | + 'include': '#string_escapes' |
1288 | 1284 | } |
1289 | 1285 | { |
1290 | 1286 | 'include': '#interpolated_js' |
|
1306 | 1302 | 'name': 'string.quoted.template.js' |
1307 | 1303 | 'patterns': [ |
1308 | 1304 | { |
1309 | | - 'match': '\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' |
1310 | | - 'name': 'constant.character.escape.js' |
| 1305 | + 'include': '#string_escapes' |
1311 | 1306 | } |
1312 | 1307 | { |
1313 | 1308 | 'include': '#interpolated_js' |
1314 | 1309 | } |
1315 | 1310 | ] |
1316 | 1311 | } |
1317 | 1312 | ] |
| 1313 | + 'string_escapes': |
| 1314 | + 'patterns': [ |
| 1315 | + { |
| 1316 | + 'match': '\\\\u(?![A-Fa-f0-9]{4}|\\{[A-Fa-f0-9]+\\})[^\'"]*' |
| 1317 | + 'name': 'invalid.illegal.identifier.js' |
| 1318 | + } |
| 1319 | + { |
| 1320 | + 'match': '\\\\u(?:[A-Fa-f0-9]{4}|(\\{)[A-Fa-f0-9]+(\\}))' |
| 1321 | + 'name': 'constant.character.escape.js' |
| 1322 | + 'captures': |
| 1323 | + '1': |
| 1324 | + 'name': 'punctuation.section.scope.begin.js' |
| 1325 | + '2': |
| 1326 | + 'name': 'punctuation.section.scope.end.js' |
| 1327 | + } |
| 1328 | + { |
| 1329 | + 'match': '\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' |
| 1330 | + 'name': 'constant.character.escape.js' |
| 1331 | + } |
| 1332 | + ] |
1318 | 1333 | 'function_params': |
1319 | 1334 | 'patterns': [ |
1320 | 1335 | { |
|
0 commit comments