Skip to content

Commit 97b4506

Browse files
committed
fix(chromaterm): replace alternation in lookbehinds for PCRE2 compat
PCRE2 requires fixed-length lookbehinds. The file path regex used `(?<=[\s(]|^)` (variable-length alternation) and the git hash regex used `(?<=commit |merge |...)` (different-length alternatives). Replaced with non-capturing groups containing individual fixed-length lookbehinds that satisfy the PCRE2 constraint. Closes #15
1 parent c74cce3 commit 97b4506

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.devcontainer/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
#### ChromaTerm
8+
- **Regex lookbehinds** — replaced alternation inside lookbehinds (`(?<=[\s(]|^)` and `(?<=commit |merge |...)`) with non-capturing groups containing individual lookbehinds (`(?:(?<=[\s(])|^)` and `(?:(?<=commit )|(?<=merge )|...)`) for PCRE2 compatibility
9+
510
### Removed
611

712
#### VS Code Extensions

.devcontainer/features/chromaterm/chromaterm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rules:
1818
# File paths with optional line numbers (e.g., src/main.py:42)
1919
# Covers common extensions for languages used in development
2020
- description: File paths with line numbers
21-
regex: '(?<=[\s(]|^)([a-zA-Z0-9_./-]+\.(py|ts|tsx|js|jsx|md|json|yml|yaml|toml|sh|rs|go|sql|css|html|svelte))(:(\d+))?'
21+
regex: '(?:(?<=[\s(])|^)([a-zA-Z0-9_./-]+\.(py|ts|tsx|js|jsx|md|json|yml|yaml|toml|sh|rs|go|sql|css|html|svelte))(:(\d+))?'
2222
color:
2323
1: f.file_purple underline
2424
4: f.line_gray
@@ -31,5 +31,5 @@ rules:
3131

3232
# Git short commit hashes (7-12 hex chars)
3333
- description: Git commit hashes
34-
regex: '(?<=commit |merge |pick |revert |fixup )[0-9a-f]{7,40}'
34+
regex: '(?:(?<=commit )|(?<=merge )|(?<=pick )|(?<=revert )|(?<=fixup ))[0-9a-f]{7,40}'
3535
color: f.hash_yellow

0 commit comments

Comments
 (0)