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

Unified Diff: lib/filterClasses.js

Issue 29324599: Issue 2392/2393 - Created container for CSS property filters (Closed)
Patch Set: Rebased and addressed comments Created Nov. 25, 2015, 11:12 a.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
« lib/cssRules.js ('K') | « lib/cssRules.js ('k') | lib/filterListener.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -117,7 +117,7 @@
let ret;
let match = (text.indexOf("#") >= 0 ? Filter.elemhideRegExp.exec(text) : null);
if (match)
- ret = ElemHideBase.fromText(text, match[1], match[2], match[3], match[4], match[5]);
+ ret = ElemHideBase.fromText(text, match[1], !!match[2], match[3], match[4], match[5]);
else if (text[0] == "!")
ret = new CommentFilter(text);
else
@@ -895,11 +895,12 @@
/**
* Creates an element hiding filter from a pre-parsed text representation
*
- * @param {String} text same as in Filter()
- * @param {String} domain domain part of the text representation (can be empty)
- * @param {String} tagName tag name part (can be empty)
- * @param {String} attrRules attribute matching rules (can be empty)
- * @param {String} selector raw CSS selector (can be empty)
+ * @param {String} text same as in Filter()
+ * @param {String} domain domain part of the text representation (can be empty)
+ * @param {Boolean} isException exception rule indicator
+ * @param {String} tagName tag name part (can be empty)
+ * @param {String} attrRules attribute matching rules (can be empty)
+ * @param {String} selector raw CSS selector (can be empty)
* @return {ElemHideFilter|ElemHideException|CSSPropertyFilter|InvalidFilter}
*/
ElemHideBase.fromText = function(text, domain, isException, tagName, attrRules, selector)
« lib/cssRules.js ('K') | « lib/cssRules.js ('k') | lib/filterListener.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld