@@ -85,29 +85,29 @@ repository:
8585 begin : \{
8686 end : \}
8787 beginCaptures :
88- ' 1 ' : {name: punctuation.definition.dict.begin.python}
88+ ' 0 ' : {name: punctuation.definition.dict.begin.python}
8989 endCaptures :
90- ' 1 ' : {name: punctuation.definition.dict.end.python}
90+ ' 0 ' : {name: punctuation.definition.dict.end.python}
9191 patterns :
9292 - include : ' #expression'
9393
9494 list :
9595 begin : \[
9696 end : \]
9797 beginCaptures :
98- ' 1 ' : {name: punctuation.definition.list.begin.python}
98+ ' 0 ' : {name: punctuation.definition.list.begin.python}
9999 endCaptures :
100- ' 1 ' : {name: punctuation.definition.list.end.python}
100+ ' 0 ' : {name: punctuation.definition.list.end.python}
101101 patterns :
102102 - include : ' #expression'
103103
104104 round-braces :
105105 begin : \(
106106 end : \)
107107 beginCaptures :
108- ' 1 ' : {name: punctuation.parenthesis.begin.python}
108+ ' 0 ' : {name: punctuation.parenthesis.begin.python}
109109 endCaptures :
110- ' 1 ' : {name: punctuation.parenthesis.end.python}
110+ ' 0 ' : {name: punctuation.parenthesis.end.python}
111111 patterns :
112112 - include : ' #expression'
113113
@@ -258,41 +258,51 @@ repository:
258258
259259 string-single-quoted-single-line :
260260 name : string.quoted.single.python
261- begin : (\b[uU])?\'
262- end : (?:\' |(?<!\\)(\n) )
261+ begin : (\b[uU])?(\')
262+ end : (\') |(?<!\\)(\n)
263263 beginCaptures :
264264 ' 1 ' : {name: storage.type.string.python}
265+ ' 2 ' : {name: punctuation.definition.string.begin.python}
265266 endCaptures :
266- ' 1 ' : {name: invalid.illegal.newline.python}
267+ ' 1 ' : {name: punctuation.definition.string.end.python}
268+ ' 2 ' : {name: invalid.illegal.newline.python}
267269 patterns :
268270 - include : ' #string-unicode-guts'
269271
270272 string-double-quoted-single-line :
271273 name : string.quoted.double.python
272- begin : (\b[uU])?\"
273- end : (?:\" |(?<!\\)(\n) )
274+ begin : (\b[uU])?(\")
275+ end : (\") |(?<!\\)(\n)
274276 beginCaptures :
275277 ' 1 ' : {name: storage.type.string.python}
278+ ' 2 ' : {name: punctuation.definition.string.begin.python}
276279 endCaptures :
277- ' 1 ' : {name: invalid.illegal.newline.python}
280+ ' 1 ' : {name: punctuation.definition.string.end.python}
281+ ' 2 ' : {name: invalid.illegal.newline.python}
278282 patterns :
279283 - include : ' #string-unicode-guts'
280284
281285 string-single-quoted-multi-line :
282286 name : string.quoted.triple.python
283- begin : (\b[uU])?\'\'\'
287+ begin : (\b[uU])?( \'\'\')
284288 end : \'\'\'
285289 beginCaptures :
286290 ' 1 ' : {name: storage.type.string.python}
291+ ' 2 ' : {name: punctuation.definition.string.begin.python}
292+ endCaptures :
293+ ' 0 ' : {name: punctuation.definition.string.end.python}
287294 patterns :
288295 - include : ' #string-unicode-guts'
289296
290297 string-double-quoted-multi-line :
291298 name : string.quoted.triple.python
292- begin : (\b[uU])?\"\"\"
299+ begin : (\b[uU])?( \"\"\")
293300 end : \"\"\"
294301 beginCaptures :
295302 ' 1 ' : {name: storage.type.string.python}
303+ ' 2 ' : {name: punctuation.definition.string.begin.python}
304+ endCaptures :
305+ ' 0 ' : {name: punctuation.definition.string.end.python}
296306 patterns :
297307 - include : ' #string-unicode-guts'
298308
@@ -303,81 +313,101 @@ repository:
303313
304314 string-bin-single-quoted-single-line :
305315 name : string.quoted.single.python
306- begin : (\b[bB])\'
307- end : (?:\' |(?<!\\)(\n) )
316+ begin : (\b[bB])(\')
317+ end : (\') |(?<!\\)(\n)
308318 beginCaptures :
309319 ' 1 ' : {name: storage.type.string.python}
320+ ' 2 ' : {name: punctuation.definition.string.begin.python}
310321 endCaptures :
311- ' 1 ' : {name: invalid.illegal.newline.python}
322+ ' 1 ' : {name: punctuation.definition.string.end.python}
323+ ' 2 ' : {name: invalid.illegal.newline.python}
312324 patterns :
313325 - include : ' #string-entity'
314326
315327 string-bin-double-quoted-single-line :
316328 name : string.quoted.double.python
317- begin : (\b[bB])\"
318- end : (?:\" |(?<!\\)(\n) )
329+ begin : (\b[bB])(\")
330+ end : (\") |(?<!\\)(\n)
319331 beginCaptures :
320332 ' 1 ' : {name: storage.type.string.python}
333+ ' 2 ' : {name: punctuation.definition.string.begin.python}
321334 endCaptures :
322- ' 1 ' : {name: invalid.illegal.newline.python}
335+ ' 1 ' : {name: punctuation.definition.string.end.python}
336+ ' 2 ' : {name: invalid.illegal.newline.python}
323337 patterns :
324338 - include : ' #string-entity'
325339
326340 string-bin-single-quoted-multi-line :
327341 name : string.quoted.triple.python
328- begin : (\b[bB])\'\'\'
342+ begin : (\b[bB])( \'\'\')
329343 end : \'\'\'
330344 beginCaptures :
331345 ' 1 ' : {name: storage.type.string.python}
346+ ' 2 ' : {name: punctuation.definition.string.begin.python}
347+ endCaptures :
348+ ' 0 ' : {name: punctuation.definition.string.end.python}
332349 patterns :
333350 - include : ' #string-entity'
334351
335352 string-bin-double-quoted-multi-line :
336353 name : string.quoted.triple.python
337- begin : (\b[bB])\"\"\"
354+ begin : (\b[bB])( \"\"\")
338355 end : \"\"\"
339356 beginCaptures :
340357 ' 1 ' : {name: storage.type.string.python}
358+ ' 2 ' : {name: punctuation.definition.string.begin.python}
359+ endCaptures :
360+ ' 0 ' : {name: punctuation.definition.string.end.python}
341361 patterns :
342362 - include : ' #string-entity'
343363
344364 string-raw-single-quoted-single-line :
345365 name : string.quoted.single.raw.python
346- begin : (\b[rR])\'
347- end : (?:\' |(?<!\\)(\n) )
366+ begin : (\b[rR])(\')
367+ end : (\') |(?<!\\)(\n)
348368 beginCaptures :
349369 ' 1 ' : {name: storage.type.string.python}
370+ ' 2 ' : {name: punctuation.definition.string.begin.python}
350371 endCaptures :
351- ' 1 ' : {name: invalid.illegal.newline.python}
372+ ' 1 ' : {name: punctuation.definition.string.end.python}
373+ ' 2 ' : {name: invalid.illegal.newline.python}
352374 patterns :
353375 - include : ' #string-raw-guts'
354376
355377 string-raw-double-quoted-single-line :
356378 name : string.quoted.double.raw.python
357- begin : (\b[rR])\"
358- end : (?:\" |(?<!\\)(\n) )
379+ begin : (\b[rR])(\")
380+ end : (\") |(?<!\\)(\n)
359381 beginCaptures :
360382 ' 1 ' : {name: storage.type.string.python}
383+ ' 2 ' : {name: punctuation.definition.string.begin.python}
361384 endCaptures :
362- ' 1 ' : {name: invalid.illegal.newline.python}
385+ ' 1 ' : {name: punctuation.definition.string.end.python}
386+ ' 2 ' : {name: invalid.illegal.newline.python}
363387 patterns :
364388 - include : ' #string-raw-guts'
365389
366390 string-raw-single-quoted-multi-line :
367391 name : string.quoted.triple.raw.python
368- begin : (\b[rR])\'\'\'
392+ begin : (\b[rR])( \'\'\')
369393 end : \'\'\'
370394 beginCaptures :
371395 ' 1 ' : {name: storage.type.string.python}
396+ ' 2 ' : {name: punctuation.definition.string.begin.python}
397+ endCaptures :
398+ ' 0 ' : {name: punctuation.definition.string.end.python}
372399 patterns :
373400 - include : ' #string-raw-guts'
374401
375402 string-raw-double-quoted-multi-line :
376403 name : string.quoted.triple.raw.python
377- begin : (\b[rR])\"\"\"
404+ begin : (\b[rR])( \"\"\")
378405 end : \"\"\"
379406 beginCaptures :
380407 ' 1 ' : {name: storage.type.string.python}
408+ ' 2 ' : {name: punctuation.definition.string.begin.python}
409+ endCaptures :
410+ ' 0 ' : {name: punctuation.definition.string.end.python}
381411 patterns :
382412 - include : ' #string-raw-guts'
383413
@@ -389,41 +419,51 @@ repository:
389419
390420 string-raw-bin-single-quoted-single-line :
391421 name : string.quoted.single.raw.python
392- begin : (\b(?:[rR][bB]|[bB][rR]))\'
393- end : (?:\' |(?<!\\)(\n) )
422+ begin : (\b(?:[rR][bB]|[bB][rR]))(\')
423+ end : (\') |(?<!\\)(\n)
394424 beginCaptures :
395425 ' 1 ' : {name: storage.type.string.python}
426+ ' 2 ' : {name: punctuation.definition.string.begin.python}
396427 endCaptures :
397- ' 1 ' : {name: invalid.illegal.newline.python}
428+ ' 1 ' : {name: punctuation.definition.string.end.python}
429+ ' 2 ' : {name: invalid.illegal.newline.python}
398430 patterns :
399431 - include : ' #string-raw-bin-guts'
400432
401433 string-raw-bin-double-quoted-single-line :
402434 name : string.quoted.double.raw.python
403- begin : (\b(?:[rR][bB]|[bB][rR]))\"
404- end : (?:\" |(?<!\\)(\n) )
435+ begin : (\b(?:[rR][bB]|[bB][rR]))(\")
436+ end : (\") |(?<!\\)(\n)
405437 beginCaptures :
406438 ' 1 ' : {name: storage.type.string.python}
439+ ' 2 ' : {name: punctuation.definition.string.begin.python}
407440 endCaptures :
408- ' 1 ' : {name: invalid.illegal.newline.python}
441+ ' 1 ' : {name: punctuation.definition.string.end.python}
442+ ' 2 ' : {name: invalid.illegal.newline.python}
409443 patterns :
410444 - include : ' #string-raw-bin-guts'
411445
412446 string-raw-bin-single-quoted-multi-line :
413447 name : string.quoted.triple.raw.python
414- begin : (\b(?:[rR][bB]|[bB][rR]))\'\'\'
448+ begin : (\b(?:[rR][bB]|[bB][rR]))( \'\'\')
415449 end : \'\'\'
416450 beginCaptures :
417451 ' 1 ' : {name: storage.type.string.python}
452+ ' 2 ' : {name: punctuation.definition.string.begin.python}
453+ endCaptures :
454+ ' 0 ' : {name: punctuation.definition.string.end.python}
418455 patterns :
419456 - include : ' #string-raw-bin-guts'
420457
421458 string-raw-bin-double-quoted-multi-line :
422459 name : string.quoted.triple.raw.python
423- begin : (\b(?:[rR][bB]|[bB][rR]))\"\"\"
460+ begin : (\b(?:[rR][bB]|[bB][rR]))( \"\"\")
424461 end : \"\"\"
425462 beginCaptures :
426463 ' 1 ' : {name: storage.type.string.python}
464+ ' 2 ' : {name: punctuation.definition.string.begin.python}
465+ endCaptures :
466+ ' 0 ' : {name: punctuation.definition.string.end.python}
427467 patterns :
428468 - include : ' #string-raw-bin-guts'
429469
0 commit comments