| Index: lib/abp2blocklist.js |
| =================================================================== |
| --- a/lib/abp2blocklist.js |
| +++ b/lib/abp2blocklist.js |
| @@ -144,17 +144,20 @@ |
| switch (c) |
| { |
| case "*": |
| if (regexp.length > 0 && i < lastIndex && text[i + 1] != "*") |
| regexp.push(".*"); |
| break; |
| case "^": |
| if (i < lastIndex) |
| - regexp.push("."); |
| + regexp.push("[^.%A-Za-z0-9_]"); |
| + else |
| + regexp.push("([^.%A-Za-z0-9_].*)?$"); |
|
Sebastian Noack
2017/06/16 21:13:18
Can you put the duplicated part of the regexp in a
Manish Jethani
2017/06/19 10:39:54
Done.
|
| + canSafelyMatchAsLowercase = false; |
|
Sebastian Noack
2017/06/16 21:13:18
Why is that necessary?
Manish Jethani
2017/06/19 10:39:54
It was converting "A-Z" into "a-z". I thought abou
|
| break; |
| case "|": |
| if (i == 0) |
| { |
| regexp.push("^"); |
| break; |
| } |
| if (i == lastIndex) |