Skip to content

Commit f11cda8

Browse files
authored
Merge pull request #195 from hamishknight/to-some-extent
2 parents d191d8e + 688f1d8 commit f11cda8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Sources/_MatchingEngine/Regex/Parse/CharacterPropertyClassification.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ extension Source {
381381
return .generalCategory(cat)
382382
}
383383
if let script = classifyScriptProperty(value) {
384-
return .script(script)
384+
return .scriptExtension(script)
385385
}
386386
if let posix = classifyPOSIX(value) {
387387
return .posix(posix)

Tests/RegexTests/MatchTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ extension RegexTests {
695695
firstMatchTest(#"\p{ISBAMUM}"#, input: "123ꚠꚡꚢxyz", match: "")
696696
firstMatchTest(#"\p{Script=Unknown}"#, input: "\u{10FFFF}", match: "\u{10FFFF}")
697697
firstMatchTest(#"\p{scx=Gujr}"#, input: "\u{a839}", match: "\u{a839}")
698+
firstMatchTest(#"\p{Gujr}"#, input: "\u{a839}", match: "\u{a839}")
698699

699700
firstMatchTest(#"\p{alpha}"#, input: "123abcXYZ", match: "a")
700701
firstMatchTest(#"\P{alpha}"#, input: "123abcXYZ", match: "1")

Tests/RegexTests/ParseTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,13 +1053,13 @@ extension RegexTests {
10531053

10541054
parseTest(#"\p{sc=grek}"#, prop(.script(.greek)))
10551055
parseTest(#"\p{sc=isGreek}"#, prop(.script(.greek)))
1056-
parseTest(#"\p{Greek}"#, prop(.script(.greek)))
1057-
parseTest(#"\p{isGreek}"#, prop(.script(.greek)))
1056+
parseTest(#"\p{Greek}"#, prop(.scriptExtension(.greek)))
1057+
parseTest(#"\p{isGreek}"#, prop(.scriptExtension(.greek)))
10581058
parseTest(#"\P{Script=Latn}"#, prop(.script(.latin), inverted: true))
10591059
parseTest(#"\p{script=zzzz}"#, prop(.script(.unknown)))
10601060
parseTest(#"\p{ISscript=iszzzz}"#, prop(.script(.unknown)))
10611061
parseTest(#"\p{scx=bamum}"#, prop(.scriptExtension(.bamum)))
1062-
parseTest(#"\p{ISBAMUM}"#, prop(.script(.bamum)))
1062+
parseTest(#"\p{ISBAMUM}"#, prop(.scriptExtension(.bamum)))
10631063

10641064
parseTest(#"\p{alpha}"#, prop(.binary(.alphabetic)))
10651065
parseTest(#"\p{DEP}"#, prop(.binary(.deprecated)))

0 commit comments

Comments
 (0)