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 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 seenSpaces |= scanner.skip(ABP_TEXT(' ')); | 108 seenSpaces |= scanner.skip(ABP_TEXT(' ')); |
109 bool emulation = false; | 109 bool emulation = false; |
110 bool exception = scanner.skipOne(ABP_TEXT('@')); | 110 bool exception = scanner.skipOne(ABP_TEXT('@')); |
111 if (exception) | 111 if (exception) |
112 seenSpaces |= scanner.skip(ABP_TEXT(' ')); | 112 seenSpaces |= scanner.skip(ABP_TEXT(' ')); |
113 else | 113 else |
114 emulation = scanner.skipOne(ABP_TEXT('?')); | 114 emulation = scanner.skipOne(ABP_TEXT('?')); |
115 | 115 |
116 String::value_type next = scanner.next(); | 116 String::value_type next = scanner.next(); |
117 if (next != u'#') | 117 if (next != ABP_TEXT('#')) |
118 return Type::UNKNOWN; | 118 return Type::UNKNOWN; |
119 | 119 |
120 // Selector part | 120 // Selector part |
121 | 121 |
122 // Selector shouldn't be empty | 122 // Selector shouldn't be empty |
123 seenSpaces |= scanner.skip(ABP_TEXT(' ')); | 123 seenSpaces |= scanner.skip(ABP_TEXT(' ')); |
124 if (scanner.done()) | 124 if (scanner.done()) |
125 return Type::UNKNOWN; | 125 return Type::UNKNOWN; |
126 | 126 |
127 data.mSelectorStart = scanner.position() + 1; | 127 data.mSelectorStart = scanner.position() + 1; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 if (item.second && !item.first.empty()) | 332 if (item.second && !item.first.empty()) |
333 { | 333 { |
334 if (!result.empty()) | 334 if (!result.empty()) |
335 result.append(ABP_TEXT(',')); | 335 result.append(ABP_TEXT(',')); |
336 result.append(item.first); | 336 result.append(item.first); |
337 } | 337 } |
338 } | 338 } |
339 } | 339 } |
340 return result; | 340 return result; |
341 } | 341 } |
OLD | NEW |