Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/matcher.js

Issue 29768690: Noissue - Compare individual characters instead of substring (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created May 2, 2018, 11:36 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/matcher.js
===================================================================
--- a/lib/matcher.js
+++ b/lib/matcher.js
@@ -117,17 +117,17 @@
return result;
// Remove options
let match = Filter.optionsRegExp.exec(text);
if (match)
text = match.input.substr(0, match.index);
// Remove whitelist marker
- if (text.substr(0, 2) == "@@")
+ if (text[0] == "@" && text[1] == "@")
text = text.substr(2);
let candidates = text.toLowerCase().match(
/[^a-z0-9%*][a-z0-9%]{3,}(?=[^a-z0-9%*])/g
);
if (!candidates)
return result;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld