code review: fix regex used to report cosmetic filters in logger

This commit is contained in:
Raymond Hill 2018-01-08 15:03:55 -05:00
parent 225bab9550
commit 098f3baadd
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ vAPI.DOMFilterer.prototype = {
if ( all !== true && this.hideNodeAttr !== undefined ) {
selectors = selectors
.replace('[' + this.hideNodeAttr + ']', '')
.replace(/^,\n|^\n/, '');
.replace(/^,\n|,\n$/gm, '');
if ( selectors === '' ) { continue; }
}
out.declarative.push([ selectors, entry.declarations ]);