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
1 changed files with 2 additions and 2 deletions

View File

@ -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);