From 2e1cb9be9b335c5d9fa5037f91d8321bb2285d89 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 30 Jan 2023 11:12:21 -0500 Subject: [PATCH] Ensure pattern is first unit for biditrie-ability purpose --- src/js/static-net-filtering.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index da803cac5..4c3763f75 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -3760,21 +3760,6 @@ class FilterCompiler { const units = []; - // Method(s) - if ( this.methodBits !== 0 || this.notMethodBits !== 0 ) { - units.push(FilterMethod.compile(this)); - } - - // Not types - if ( this.notTypeBits !== 0 ) { - units.push(FilterNotType.compile(this)); - } - - // Strict partiness - if ( this.strictParty !== 0 ) { - units.push(FilterStrictParty.compile(this)); - } - // Pattern const patternClass = this.compilePattern(units); @@ -3792,6 +3777,21 @@ class FilterCompiler { units.push(FilterAnchorRight.compile()); } + // Method(s) + if ( this.methodBits !== 0 || this.notMethodBits !== 0 ) { + units.push(FilterMethod.compile(this)); + } + + // Not types + if ( this.notTypeBits !== 0 ) { + units.push(FilterNotType.compile(this)); + } + + // Strict partiness + if ( this.strictParty !== 0 ) { + units.push(FilterStrictParty.compile(this)); + } + // Origin if ( this.fromDomainOpt !== '' ) { compileFromDomainOpt(