| Index: lib/filterClasses.js |
| =================================================================== |
| --- a/lib/filterClasses.js |
| +++ b/lib/filterClasses.js |
| @@ -115,36 +115,19 @@ |
| * basic parsing and calls the right constructor then. |
| * |
| * @param {string} text as in Filter() |
| * @return {Filter} |
| */ |
| Filter.fromText = function(text) |
| { |
| let filter = Filter.knownFilters.get(text); |
| - if (filter) |
|
Manish Jethani
2018/08/27 21:42:46
I'm not sure why you removed this because this is
Jon Sonesen
2018/08/27 21:49:01
Dang wth I didn't mean to do that
|
| - return filter; |
| - |
| let match = text.includes("#") ? Filter.contentRegExp.exec(text) : null; |
| if (match) |
| - { |
| - let propsMatch; |
| - if (!match[2] && match[3].includes("[-") && |
| - (propsMatch = /\[-abp-properties=(["'])([^"']+)\1\]/.exec(match[3]))) |
| - { |
| - // This is legacy CSS properties syntax, convert to current syntax |
| - let prefix = match[3].substr(0, propsMatch.index); |
| - let expression = propsMatch[2]; |
| - let suffix = match[3].substr(propsMatch.index + propsMatch[0].length); |
| - return Filter.fromText(`${match[1]}#?#` + |
| - `${prefix}:-abp-properties(${expression})${suffix}`); |
| - } |
| - |
| filter = ContentFilter.fromText(text, match[1], match[2], match[3]); |
| - } |
| else if (text[0] == "!") |
| filter = new CommentFilter(text); |
| else |
| filter = RegExpFilter.fromText(text); |
| Filter.knownFilters.set(filter.text, filter); |
| return filter; |
| }; |