Skip to content

Commit 9e5b314

Browse files
committed
Negated group
1 parent d6a474c commit 9e5b314

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Util/FileMatcher.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ private static function processTokens(array $tokens): array
140140

141141
if ($escaped === true) {
142142
$resolved[] = [self::T_CHAR, $char];
143+
$escaped = false;
143144
continue;
144145
}
145146

tests/unit/Util/FileMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ public static function provideCharacterGroup(): Generator
494494
'/b/[!a-c]/c/d' => false,
495495
],
496496
];
497-
yield 'literal backslash neagted group' => [
497+
yield 'literal backslash negated group' => [
498498
new FileMatcherPattern('/a/\\\[!a-c]/c'),
499499
[
500500
'/a/\\d/c' => true,

0 commit comments

Comments
 (0)