Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ contexts:
1: constant.character.escape.python
- match: (?:{{brace_start}}|{{brace_end}})
scope: constant.character.escape.python

ranged-quantifier-fallback:
- meta_include_prototype: false
- match: '{{brace_start}}'
scope: constant.character.escape.python
pop: 1
2 changes: 1 addition & 1 deletion Python/Embeddings/RegExp (for Python).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@ contexts:

ranged-quantifier-fallback:
- meta_include_prototype: false
- match: ''
- match: '{{brace_start}}'
pop: 1
23 changes: 23 additions & 0 deletions Python/tests/syntax_test_python_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,12 @@
# ^ invalid.deprecated.character.escape.python
# ^^^ constant.character.escape.python

r'\b{{{{{ss_var}_active}}}}'
#^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.python string.quoted.single.python - constant.character
#^ punctuation.definition.string.begin.python
# ^ punctuation.definition.string.end.python


################################
# regular expression backrefs
################################
Expand Down Expand Up @@ -1960,6 +1966,23 @@
# ^ constant.character.escape.regexp - constant.character.escape.python
# ^^ constant.character.escape.regexp constant.character.escape.python

fr'\b{{{{{ss_var}_active}}}}'
#^ storage.type.string.python
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.python
# ^^^^^^^ string.quoted.single.python
# ^ punctuation.definition.string.begin.python
# ^^^^^^ source.regexp.python meta.mode.basic.regexp
# ^^ keyword.control.anchor.regexp
# ^^^^ constant.character.escape.python
# ^^^^^^^^ meta.interpolation.python - string
# ^ punctuation.section.interpolation.begin.python
# ^^^^^^ variable.other.python
# ^ punctuation.section.interpolation.end.python
# ^^^^^^^^^^^^ string.quoted.single.python
# ^^^^^^^^^^^ source.regexp.python meta.mode.basic.regexp
# ^^^^ constant.character.escape.python
# ^ punctuation.definition.string.end.python

fr'\x{c:02x} becomes \xAB'
#^ storage.type.string.python
# ^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.python
Expand Down