From 098f3baadd500d2f4f33ac042d15083a320c0721 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 8 Jan 2018 15:03:55 -0500 Subject: [PATCH] code review: fix regex used to report cosmetic filters in logger --- platform/webext/vapi-usercss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/webext/vapi-usercss.js b/platform/webext/vapi-usercss.js index 10e7d371e..9db9bce1b 100644 --- a/platform/webext/vapi-usercss.js +++ b/platform/webext/vapi-usercss.js @@ -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 ]);