File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Sources/_StringProcessing Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -287,11 +287,8 @@ extension DSLTree.CustomCharacterClass.Member {
287287 }
288288 case . trivia:
289289 // TODO: Should probably strip this earlier...
290- return { _, bounds in
291- return bounds. lowerBound
292- }
290+ return { _, _ in nil }
293291 }
294-
295292 }
296293}
297294
Original file line number Diff line number Diff line change @@ -1208,6 +1208,16 @@ extension RegexTests {
12081208 ( " CaFe " , true ) ,
12091209 ( " EfAc " , true ) )
12101210 }
1211+
1212+ func testNonSemanticWhitespace( ) {
1213+ firstMatchTest ( #" \t "# , input: " \t " , match: " \t " )
1214+ firstMatchTest ( #"(?xx) \t "# , input: " \t " , match: " \t " )
1215+
1216+ firstMatchTest ( #"[ \t]+"# , input: " \t " , match: " \t " )
1217+ firstMatchTest ( #"(?xx)[ \t]+"# , input: " \t " , match: " \t " )
1218+ firstMatchTest ( #"(?xx)[ \t]+"# , input: " \t \t " , match: " \t \t " )
1219+ firstMatchTest ( #"(?xx)[ \t]+"# , input: " \t \t " , match: " \t " )
1220+ }
12111221
12121222 func testASCIIClasses( ) {
12131223 // 'D' ASCII-only digits
You can’t perform that action at this time.
0 commit comments