mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-02 17:02:40 +01:00
code review for b10ac0020d
: fix too rigid field separator
This commit is contained in:
parent
c2ce20e52c
commit
eb789939ca
@ -887,7 +887,7 @@ var modifyRuleset = function(details) {
|
||||
var rule, parts, _;
|
||||
for ( rule of toRemove ) {
|
||||
if ( rule === '' ) { continue; }
|
||||
parts = rule.split(/\s/);
|
||||
parts = rule.split(/\s+/);
|
||||
_ = hnRuleset.removeFromRuleParts(parts) ||
|
||||
swRuleset.removeFromRuleParts(parts) ||
|
||||
urlRuleset.removeFromRuleParts(parts);
|
||||
@ -895,7 +895,7 @@ var modifyRuleset = function(details) {
|
||||
var toAdd = new Set(details.toAdd.trim().split(/\s*[\n\r]+\s*/));
|
||||
for ( rule of toAdd ) {
|
||||
if ( rule === '' ) { continue; }
|
||||
parts = rule.split(/\s/);
|
||||
parts = rule.split(/\s+/);
|
||||
_ = hnRuleset.addFromRuleParts(parts) ||
|
||||
swRuleset.addFromRuleParts(parts) ||
|
||||
urlRuleset.addFromRuleParts(parts);
|
||||
|
Loading…
Reference in New Issue
Block a user