| OLD | NEW | 
|---|
| 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 | 
| 11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
| 12  * GNU General Public License for more details. | 12  * GNU General Public License for more details. | 
| 13  * | 13  * | 
| 14  * You should have received a copy of the GNU General Public License | 14  * You should have received a copy of the GNU General Public License | 
| 15  * along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>. | 15  * along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>. | 
| 16  */ | 16  */ | 
| 17 | 17 | 
| 18 #include "ElemHideBase.h" | 18 #include "ElemHideBase.h" | 
| 19 #include "../StringScanner.h" | 19 #include "../StringScanner.h" | 
| 20 | 20 | 
|  | 21 ABP_NS_USING | 
|  | 22 | 
| 21 namespace | 23 namespace | 
| 22 { | 24 { | 
| 23   void NormalizeWhitespace(DependentString& text, String::size_type& domainsEnd, | 25   void NormalizeWhitespace(DependentString& text, String::size_type& domainsEnd, | 
| 24       String::size_type& selectorStart) | 26       String::size_type& selectorStart) | 
| 25   { | 27   { | 
| 26     // For element hiding filters we only want to remove spaces preceding the | 28     // For element hiding filters we only want to remove spaces preceding the | 
| 27     // selector part. The positions we've determined already have to be adjusted | 29     // selector part. The positions we've determined already have to be adjusted | 
| 28     // accordingly. | 30     // accordingly. | 
| 29 | 31 | 
| 30     String::size_type delta = 0; | 32     String::size_type delta = 0; | 
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138       if (item.second && !item.first.empty()) | 140       if (item.second && !item.first.empty()) | 
| 139       { | 141       { | 
| 140         if (!result.empty()) | 142         if (!result.empty()) | 
| 141           result.append(u','); | 143           result.append(u','); | 
| 142         result.append(item.first); | 144         result.append(item.first); | 
| 143       } | 145       } | 
| 144     } | 146     } | 
| 145   } | 147   } | 
| 146   return result; | 148   return result; | 
| 147 } | 149 } | 
| OLD | NEW | 
|---|