Skip to content

Fix format string placeholders#5

Merged
michaelblyons merged 1 commit intomichaelblyons:refactorfrom
SublimeText:fix/format-placeholders
Dec 23, 2025
Merged

Fix format string placeholders#5
michaelblyons merged 1 commit intomichaelblyons:refactorfrom
SublimeText:fix/format-placeholders

Conversation

@deathaxe
Copy link
Copy Markdown

Fixes SublimeText#214

This PR...

  1. separates double- and single-quoted format string contexts to enable quotation marks in format-strings.
  2. scopes format-spec part same way as python does
  3. restricts format placeholders to brace followed by digits ({\d+) to avoid false positives with ordinary braces in strings.

This commit...

1. separates double- and single-quoted format string contexts to enable
   quotation marks in format-strings.
2. scopes format-spec as python
3. restricts format placeholders to brace+digit `{\d+}` to avoid false positives
@michaelblyons michaelblyons merged commit 8bcaa62 into michaelblyons:refactor Dec 23, 2025
3 checks passed
@deathaxe deathaxe deleted the fix/format-placeholders branch December 23, 2025 16:16
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.

2 participants