| LEFT | RIGHT |
| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 var match = _regexp_data[id].exec(readString(str)); | 96 var match = _regexp_data[id].exec(readString(str)); |
| 97 if (match) | 97 if (match) |
| 98 return match.index; | 98 return match.index; |
| 99 return -1; | 99 return -1; |
| 100 }, | 100 }, |
| 101 | 101 |
| 102 MatchRegExp__deps: ["$_regexp_data"], | 102 MatchRegExp__deps: ["$_regexp_data"], |
| 103 MatchRegExp: function(id, str, reMatchResults) | 103 MatchRegExp: function(id, str, reMatchResults) |
| 104 { | 104 { |
| 105 var string = readString(str); | 105 var string = readString(str); |
| 106 var result = new exports.ReMatchResults(reMatchResults); |
| 106 var matches = string.match(_regexp_data[id]); | 107 var matches = string.match(_regexp_data[id]); |
| 107 if (!matches) | 108 if (!matches) |
| 108 return false; | 109 return false; |
| 109 for (var i = 0; i < matches.length; i++) | 110 for (var i = 0; i < matches.length; i++) |
| 110 reMatchResults.push(createString(matches[i])); | 111 result.push(matches[i]); |
| 111 return true; | 112 return true; |
| 112 } | 113 } |
| 113 }); | 114 }); |
| LEFT | RIGHT |