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

Unified Diff: compiled/filter/RegExpFilter.cpp

Issue 29574665: Issue 5159 - Expose collapse property for BlockingFilter (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Added test for collapse Created Oct. 13, 2017, 3:40 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 | « compiled/filter/RegExpFilter.h ('k') | test/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/filter/RegExpFilter.cpp
===================================================================
--- a/compiled/filter/RegExpFilter.cpp
+++ b/compiled/filter/RegExpFilter.cpp
@@ -213,27 +213,27 @@
data.mSitekeysEnd = valueEnd;
}
}
else if (name.equals(u"match-case"_str))
data.mMatchCase = !reverse;
else if (name.equals(u"third-party"_str))
data.mThirdParty = reverse ? TrippleState::NO : TrippleState::YES;
else if (name.equals(u"collapse"_str))
- data.mCollapse = reverse ? TrippleState::NO : TrippleState::YES;
+ data.mCollapse = reverse ? false : true;
sergei 2017/11/21 11:24:03 I wonder whether it should be just `!reverse`.
hub 2017/11/21 15:15:20 good point. Done.
else
error.reset(u"filter_unknown_option"_str);
}
void ParseOptions(String& text, DependentString& error, RegExpFilterData& data,
String::size_type optionsStart)
{
data.mMatchCase = false;
data.mThirdParty = TrippleState::ANY;
- data.mCollapse = TrippleState::ANY;
+ data.mCollapse = true;
data.mDomainsStart = String::npos;
data.mSitekeysStart = String::npos;
if (optionsStart >= text.length())
{
data.mContentType = defaultTypeMask;
return;
}
« no previous file with comments | « compiled/filter/RegExpFilter.h ('k') | test/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld