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

Side by Side Diff: compiled/filter/RegExpFilter.cpp

Issue 29723641: Issue 6180 - Add a few missing ABP_TEXT() macros (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created March 15, 2018, 4:13 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 | « compiled/filter/ElemHideBase.cpp ('k') | no next file » | 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Not actually an anchor, escape it 122 // Not actually an anchor, escape it
123 result.append(ABP_TEXT("\\|"_str)); 123 result.append(ABP_TEXT("\\|"_str));
124 } 124 }
125 break; 125 break;
126 default: 126 default:
127 if (!(currChar >= ABP_TEXT('a') && currChar <= ABP_TEXT('z')) && 127 if (!(currChar >= ABP_TEXT('a') && currChar <= ABP_TEXT('z')) &&
128 !(currChar >= ABP_TEXT('A') && currChar <= ABP_TEXT('Z')) && 128 !(currChar >= ABP_TEXT('A') && currChar <= ABP_TEXT('Z')) &&
129 !(currChar >= ABP_TEXT('0') && currChar <= ABP_TEXT('9')) && 129 !(currChar >= ABP_TEXT('0') && currChar <= ABP_TEXT('9')) &&
130 currChar < 128) 130 currChar < 128)
131 { 131 {
132 result.append(u'\\'); 132 result.append(ABP_TEXT('\\'));
133 } 133 }
134 result.append(currChar); 134 result.append(currChar);
135 } 135 }
136 prevChar = currChar; 136 prevChar = currChar;
137 } 137 }
138 return result; 138 return result;
139 } 139 }
140 140
141 void NormalizeWhitespace(DependentString& text) 141 void NormalizeWhitespace(DependentString& text)
142 { 142 {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 return false; 390 return false;
391 } 391 }
392 392
393 if (!mData.RegExpParsingDone()) 393 if (!mData.RegExpParsingDone())
394 { 394 {
395 const OwnedString pattern(mData.GetRegExpSource(mText)); 395 const OwnedString pattern(mData.GetRegExpSource(mText));
396 mData.SetRegExp(GenerateRegExp(RegExpFromSource(pattern), mData.mMatchCase)) ; 396 mData.SetRegExp(GenerateRegExp(RegExpFromSource(pattern), mData.mMatchCase)) ;
397 } 397 }
398 return TestRegExp(mData.mRegexpId, location); 398 return TestRegExp(mData.mRegexpId, location);
399 } 399 }
OLDNEW
« no previous file with comments | « compiled/filter/ElemHideBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld