1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 01:59:38 +02:00

Fix compiling of negated regex-based to= domain

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2234#discussioncomment-5655665
This commit is contained in:
Raymond Hill 2023-04-19 07:40:12 -04:00
parent 899c39903b
commit 3dddf4ca47
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1500,7 +1500,7 @@ const compileDomainOpt = (ctors, iterable, prepend, units) => {
if ( len <= beg ) { continue; }
if ( s.charCodeAt(beg) === 0x2F /* / */ ) {
if ( beg === 0 ) { regexHits.push(s); continue; }
regexMisses.push(s); continue;
regexMisses.push(s.slice(1)); continue;
}
if ( s.endsWith('.*') === false ) {
if ( beg === 0 ) { hostnameHits.push(s); continue; }