Skip to content

Properly follow PCRE specs for space characters in patterns with x modifier - #191

Merged
mundschenk-at merged 1 commit into
mainfrom
fix-nbsp-with-x
Aug 5, 2026
Merged

mundschenk-at merged 1 commit into
mainfrom
fix-nbsp-with-x

Conversation

@mundschenk-at

@mundschenk-at mundschenk-at commented Aug 5, 2026 •

Copy link
Copy Markdown
Owner

Kudos to @wvell for the bug report (and a lot of stamina to get me to follow through) via #188.

The PCRE spec requires space characters in patterns with the x modifier (PCRE_EXTEND) to be either

  1. contained in a character class, or
  2. PCRE-escaped (otherwise they are ignored).

This PR moves all occurrences of U::NO_BREAK_SPACE and U::NARROW_NO_BREAK_SPACE to character classes in REs with the x modifier.

@mundschenk-at mundschenk-at added this to the 7.0.0 milestone Aug 5, 2026
@mundschenk-at mundschenk-at self-assigned this Aug 5, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@mundschenk-at
mundschenk-at merged commit 671a3f5 into main Aug 5, 2026
11 checks passed
@mundschenk-at
mundschenk-at deleted the fix-nbsp-with-x branch August 5, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant