emit nullopt for unmatched groups in std_regex_provider::regex_search#1148
Merged
anonrig merged 1 commit intoMay 25, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1148 +/- ##
==========================================
- Coverage 59.88% 59.87% -0.01%
==========================================
Files 37 37
Lines 6132 6133 +1
Branches 2977 2978 +1
==========================================
Hits 3672 3672
Misses 617 617
- Partials 1843 1844 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
anonrig
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed regex_search only pushes capture groups whose submatch participated, while create_component_match_result maps the returned vector onto the group name list by position. An optional group that does not match (e.g. pathname
(a)?(b)againstb) drops a slot, sobis reported under name "0" instead of "1" and group "1" disappears. Push nullopt for non-participating groups so undefined groups stay aligned with their names. The harness already skips WPT cases with null group values, which is why this was not caught.