1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 15:02:27 +02:00

Fix regression in logger's reverse-lookup of filters

Related commit:
- e1d75ee602
This commit is contained in:
Raymond Hill 2019-09-30 11:41:43 -04:00
parent ef45543c83
commit 7ac908a3f8
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -38,7 +38,7 @@ const extractBlocks = function(content, begId, endId) {
const beg = match.index + match[0].length;
const blockId = parseInt(match[1], 10);
if ( blockId >= begId && blockId < endId ) {
var end = content.indexOf('#block-end-' + match[1], beg);
const end = content.indexOf('#block-end-' + match[1], beg);
out.push(content.slice(beg, end));
reBlockStart.lastIndex = end;
}
@ -59,7 +59,7 @@ const fromNetFilter = function(details) {
for ( const assetKey in listEntries ) {
const entry = listEntries[assetKey];
if ( entry === undefined ) { continue; }
const content = extractBlocks(entry.content, 0, 0);
const content = extractBlocks(entry.content, 0, 1);
let pos = 0;
for (;;) {
pos = content.indexOf(compiledFilter, pos);