mirror of https://github.com/gorhill/uBlock.git
Fix regression in logger's reverse-lookup of filters
Related commit:
- e1d75ee602
This commit is contained in:
parent
ef45543c83
commit
7ac908a3f8
|
@ -38,7 +38,7 @@ const extractBlocks = function(content, begId, endId) {
|
||||||
const beg = match.index + match[0].length;
|
const beg = match.index + match[0].length;
|
||||||
const blockId = parseInt(match[1], 10);
|
const blockId = parseInt(match[1], 10);
|
||||||
if ( blockId >= begId && blockId < endId ) {
|
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));
|
out.push(content.slice(beg, end));
|
||||||
reBlockStart.lastIndex = end;
|
reBlockStart.lastIndex = end;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ const fromNetFilter = function(details) {
|
||||||
for ( const assetKey in listEntries ) {
|
for ( const assetKey in listEntries ) {
|
||||||
const entry = listEntries[assetKey];
|
const entry = listEntries[assetKey];
|
||||||
if ( entry === undefined ) { continue; }
|
if ( entry === undefined ) { continue; }
|
||||||
const content = extractBlocks(entry.content, 0, 0);
|
const content = extractBlocks(entry.content, 0, 1);
|
||||||
let pos = 0;
|
let pos = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
pos = content.indexOf(compiledFilter, pos);
|
pos = content.indexOf(compiledFilter, pos);
|
||||||
|
|
Loading…
Reference in New Issue