Repository navigation
fix: Convert ECMA patterns in Draft 2019-09 unevaluatedProperties - #998
Merged
DannyvdSluijs merged 1 commit intoNov 24, 2026
Merged
DannyvdSluijs merged 1 commit into
DannyvdSluijs merged 1 commit into
Conversation
DannyvdSluijs
approved these changes
Nov 24, 2026
Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
DannyvdSluijs
force-pushed
the
fix/unevaluated-properties-ecma-pattern
branch
from
November 24, 2026 20:12
47f67f5 to
12fea9b
Compare
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.
#943 introduced
EcmaPatternConverterforpattern,patternPropertiesandadditionalProperties.unevaluatedProperties(#931) was merged with its owncreatePregMatchPattern(), which only maps\p{digit}and\p{Letter}and compiles the pattern with/u. As a result,\d,\wand similar classes match non-ASCII characters there.When it decides which properties
patternPropertieshas already evaluated,unevaluatedPropertiescan therefore disagree withpatternPropertiesitself. With{"patternProperties": {"^\\d+$": …}, "unevaluatedProperties": false}, the property"٣"(an Arabic-Indic digit) is not matched bypatternProperties, yetunevaluatedPropertiestreats it as evaluated, so the instance passes.This replaces
createPregMatchPattern()withEcmaPatternConverter::toPcre(), which also covers both\p{…}aliases, and adds the case toEcmaPatternTest.