Skip to content

fix(regexp): enable Unicode matching for the v flag - #5580

Merged
jedel1043 merged 1 commit into
boa-dev:mainfrom
sovopr:codex/regexp-unicode-sets-word-boundary
Oct 16, 2026
Merged

jedel1043 merged 1 commit into
boa-dev:mainfrom
sovopr:codex/regexp-unicode-sets-word-boundary

Conversation

@sovopr

@sovopr sovopr commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #5571.

/^(?:\D\b)$/iv.test("\u212a") currently returns false. The conversion to regress::Flags enables Unicode-aware matching only for u, leaving v word boundaries in non-Unicode mode. Enable the backend's unicode flag for either JavaScript Unicode flag, while preserving the separate unicode_sets flag and the public .unicode / .unicodeSets getters.

The regression covers Kelvin sign and long s with iv, iu, plain v, and plain i, plus \w, \W, and the exposed flag getters. This follows HasEitherUnicodeFlag and WordCharacters.

Validation:

  • The new regression fails on the original implementation at the issue's Kelvin-sign example.
  • cargo test -p boa_engine -p boa_parser --lib -j 2: 1,452 passed, 1 ignored.
  • All ten regression assertions also pass in Node.js.
  • cargo fmt --all --check and git diff --check pass.
  • Clippy passes for the affected packages with all targets, and for the entire workspace with all features/all targets and with no default features. Each run uses -D warnings -A clippy::incompatible_msrv: strict Clippy on this ARM Mac reports an existing MSRV diagnostic at core/engine/src/builtins/number/conversions.rs:85 (__jcvt, introduced by Replace asm!() with __jcvt() on AArch64 for f64 → i32 conversion #5577, outside this change). Toolchain: Rust 1.98.0.

AI assistance: OpenAI Codex assisted with implementation and testing.

@github-actions github-actions Bot added Waiting On Review Waiting on reviews from the maintainers C-Parser Issues surrounding the parser C-Tests Issues and PRs related to the tests. labels Oct 12, 2026
@github-actions github-actions Bot added this to the v0.23 milestone Oct 12, 2026
@github-actions github-actions Bot added the C-Builtins PRs and Issues related to builtins/intrinsics label Oct 12, 2026
@sovopr
sovopr marked this pull request as ready for review October 12, 2026 19:47
@sovopr
sovopr requested a review from a team as a code owner October 12, 2026 19:47

@jedel1043 jedel1043 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jedel1043
jedel1043 enabled auto-merge October 16, 2026 13:54
@github-actions

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,578 53,578 0
Passed 51,450 51,448 -2
Ignored 1,648 1,648 0
Failed 480 482 +2
Panics 0 0 0
Conformance 96.03% 96.02% -0.00%
Broken tests (2):
test/staging/sm/Promise/promise-species.js (previously Passed)
test/staging/sm/Symbol/species.js (previously Passed)

Tested main commit: f0789a20d87ad52eef6460953929c2b3cdbf8716
Tested PR commit: f2492923a28a871c03df9909035e4f2cf2f57d0b
Compare commits: f0789a2...f249292

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.07%. Comparing base (6ddc2b4) to head (f249292).
⚠️ Report is 1074 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5580       +/-   ##
===========================================
+ Coverage   47.24%   63.07%   +15.83%     
===========================================
  Files         476      536       +60     
  Lines       46892    60327    +13435     
===========================================
+ Hits        22154    38054    +15900     
+ Misses      24738    22273     -2465     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jedel1043
jedel1043 added this pull request to the merge queue Oct 16, 2026
Merged via the queue into boa-dev:main with commit e33a54f Oct 16, 2026
22 checks passed
@github-actions github-actions Bot removed the Waiting On Review Waiting on reviews from the maintainers label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Builtins PRs and Issues related to builtins/intrinsics C-Parser Issues surrounding the parser C-Tests Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

regex /iv word boundary misses the Kelvin sign

2 participants