From dad65991385eb7d657078eeb691b0033bc88d5ae Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 4 Aug 2020 15:58:32 -0400 Subject: [PATCH] Fix regression causing preventing using `-`-prefixed pseudo-elements Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/89#issuecomment-668701495 --- src/js/static-filtering-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index e1186ff59..67ec82bfb 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -1177,7 +1177,7 @@ Parser.prototype.SelectorCompiler = class { ]); this.reSimpleSelector = /^[#.][A-Za-z_][\w-]*$/; this.div = document.createElement('div'); - this.rePseudoClass = /:(?::?after|:?before|:[a-z][a-z-]*[a-z])$/; + this.rePseudoClass = /:(?::?after|:?before|:-?[a-z][a-z-]*[a-z])$/; this.reProceduralOperator = new RegExp([ '^(?:', Array.from(parser.proceduralOperatorTokens.keys()).join('|'),