Skip to content

Commit 6a435ec

Browse files
committed
fix: slash/backslash not escaped in regex
1 parent 3e91b6d commit 6a435ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/code-point-range.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function difference(rangeA: CodePointRange, rangeB: CodePointRange): [] |
107107
}
108108

109109
export function isMetaChar(char: string): boolean {
110-
return /^[.^$*+?()[\]{\|]$/.test(char)
110+
return /^[.^$*+?()[\]{\|\\\/]$/.test(char)
111111
}
112112

113113
function codePointToString(codePoint: number): string {

0 commit comments

Comments
 (0)