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

Side by Side Diff: lib/matcher.js

Issue 29803562: Noissue - Add @link tag for JSDoc references (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 9, 2018, 1:32 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/filterClasses.js ('k') | lib/subscriptionClasses.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 let matcher = ( 362 let matcher = (
363 filter instanceof WhitelistFilter ? this.whitelist : this.blacklist 363 filter instanceof WhitelistFilter ? this.whitelist : this.blacklist
364 ); 364 );
365 if (matcher.hasFilter(filter)) 365 if (matcher.hasFilter(filter))
366 return !matcher.getKeywordForFilter(filter); 366 return !matcher.getKeywordForFilter(filter);
367 return !matcher.findKeyword(filter); 367 return !matcher.findKeyword(filter);
368 }, 368 },
369 369
370 /** 370 /**
371 * Optimized filter matching testing both whitelist and blacklist matchers 371 * Optimized filter matching testing both whitelist and blacklist matchers
372 * simultaneously. For parameters see Matcher.matchesAny(). 372 * simultaneously. For parameters see
373 {@link Matcher#matchesAny Matcher.matchesAny()}.
373 * @see Matcher#matchesAny 374 * @see Matcher#matchesAny
374 * @inheritdoc 375 * @inheritdoc
375 */ 376 */
376 matchesAnyInternal(location, typeMask, docDomain, thirdParty, sitekey, 377 matchesAnyInternal(location, typeMask, docDomain, thirdParty, sitekey,
377 specificOnly) 378 specificOnly)
378 { 379 {
379 let candidates = location.toLowerCase().match(/[a-z0-9%]{3,}/g); 380 let candidates = location.toLowerCase().match(/[a-z0-9%]{3,}/g);
380 if (candidates === null) 381 if (candidates === null)
381 candidates = []; 382 candidates = [];
382 candidates.push(""); 383 candidates.push("");
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 425
425 return result; 426 return result;
426 } 427 }
427 }; 428 };
428 429
429 /** 430 /**
430 * Shared CombinedMatcher instance that should usually be used. 431 * Shared CombinedMatcher instance that should usually be used.
431 * @type {CombinedMatcher} 432 * @type {CombinedMatcher}
432 */ 433 */
433 exports.defaultMatcher = new CombinedMatcher(); 434 exports.defaultMatcher = new CombinedMatcher();
OLDNEW
« no previous file with comments | « lib/filterClasses.js ('k') | lib/subscriptionClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld