Skip to content

[Python] Fix raw string replacements#4586

Merged
deathaxe merged 2 commits into
sublimehq:masterfrom
deathaxe:pr/python/fix-raw-string-replacements
Jul 15, 2026
Merged

[Python] Fix raw string replacements#4586
deathaxe merged 2 commits into
sublimehq:masterfrom
deathaxe:pr/python/fix-raw-string-replacements

Conversation

@deathaxe

Copy link
Copy Markdown
Collaborator

Fixes #4585

This PR...

  1. introduces dedicated raw-string-replacement contexts without escape sequences
  2. reorganizes string replacement related contexts by moving them directly below their related/owning string type
  3. renames former string-replacement to u-string-replacement to express its unique use in normal unicode strings.

deathaxe added 2 commits July 10, 2026 21:55
Add raw-string-replacements by copying string-replacements and removing
escaped-chars.
Group string replacement contexts below last related string content contexts.
@michaelblyons

Copy link
Copy Markdown
Collaborator

I think it would be funny to collect stats per language of "line and context count relating to strings" as a percentage of the total.

@jrappen

jrappen commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Even worse are the languages with significant whitespace and need for branching, with capturing across contexts. And then those that are that on top of being markup languages.

@deathaxe
deathaxe merged commit 8990444 into sublimehq:master Jul 15, 2026
2 checks passed
@deathaxe
deathaxe deleted the pr/python/fix-raw-string-replacements branch July 15, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Python] False-positive invalid highlighting of escaped character in template placeholder

3 participants