| 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-2015 Eyeo GmbH |    3  * Copyright (C) 2006-2015 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 /** @module filterValidation */ | 
 |   19  | 
|   18 let {Filter, InvalidFilter, ElemHideBase} = require("filterClasses"); |   20 let {Filter, InvalidFilter, ElemHideBase} = require("filterClasses"); | 
|   19  |   21  | 
|   20 /** |   22 /** | 
|   21  * Parses and validates a filter given by the user. |   23  * Parses and validates a filter given by the user. | 
|   22  * |   24  * | 
|   23  * @param {string}  text |   25  * @param {string}  text | 
|   24  * @param {Boolean} [ignoreHeaders=false]  If true, no exception is raised |   26  * @param {Boolean} [ignoreHeaders=false]  If true, no exception is raised | 
|   25  *                                         for filter list headers, instead |   27  *                                         for filter list headers, instead | 
|   26  *                                         the function will return null. |   28  *                                         the function will return null. | 
|   27  * @return {Filter} |   29  * @return {Filter} | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   97       throw ext.i18n.getMessage("line", (i + 1).toString()) + ": " + error; |   99       throw ext.i18n.getMessage("line", (i + 1).toString()) + ": " + error; | 
|   98     } |  100     } | 
|   99  |  101  | 
|  100     if (filter) |  102     if (filter) | 
|  101       filters.push(filter); |  103       filters.push(filter); | 
|  102   } |  104   } | 
|  103  |  105  | 
|  104   return filters; |  106   return filters; | 
|  105 } |  107 } | 
|  106 exports.parseFilters = parseFilters; |  108 exports.parseFilters = parseFilters; | 
| OLD | NEW |