mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 04:57:56 +03:00
nixos/cgit: fix \v and \f in regexEscape
This commit is contained in:
parent
45f06d9712
commit
8980fdd9b5
@ -14,7 +14,9 @@ let
|
|||||||
# taken from https://github.com/python/cpython/blob/05cb728d68a278d11466f9a6c8258d914135c96c/Lib/re.py#L251-L266
|
# taken from https://github.com/python/cpython/blob/05cb728d68a278d11466f9a6c8258d914135c96c/Lib/re.py#L251-L266
|
||||||
special = [
|
special = [
|
||||||
"(" ")" "[" "]" "{" "}" "?" "*" "+" "-" "|" "^" "$" "\\" "." "&" "~"
|
"(" ")" "[" "]" "{" "}" "?" "*" "+" "-" "|" "^" "$" "\\" "." "&" "~"
|
||||||
"#" " " "\t" "\n" "\r" "\v" "\f"
|
"#" " " "\t" "\n" "\r"
|
||||||
|
"" # \v / 0x0B
|
||||||
|
"" # \f / 0x0C
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
replaceStrings special (map (c: "\\${c}") special);
|
replaceStrings special (map (c: "\\${c}") special);
|
||||||
|
Loading…
Reference in New Issue
Block a user