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

Side by Side Diff: lib/iniParser.js

Issue 30013625: Issue 7094 - Link filters with subscriptions in INI parser (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Use template string Created Feb. 22, 2019, 3:47 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 | « no previous file | test/filterStorage_readwrite.js » ('j') | 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 this.subscriptions.push(subscription); 100 this.subscriptions.push(subscription);
101 break; 101 break;
102 102
103 case "subscription filters": 103 case "subscription filters":
104 if (this.subscriptions.length) 104 if (this.subscriptions.length)
105 { 105 {
106 let currentSubscription = this.subscriptions[ 106 let currentSubscription = this.subscriptions[
107 this.subscriptions.length - 1 107 this.subscriptions.length - 1
108 ]; 108 ];
109 for (let text of this._curObj) 109 for (let text of this._curObj)
110 {
110 currentSubscription.addFilterText(text); 111 currentSubscription.addFilterText(text);
112 Filter.fromText(text).addSubscription(currentSubscription);
113 }
111 } 114 }
112 break; 115 break;
113 } 116 }
114 } 117 }
115 118
116 if (line === null) 119 if (line === null)
117 return; 120 return;
118 121
119 this._curSection = match[1].toLowerCase(); 122 this._curSection = match[1].toLowerCase();
120 switch (this._curSection) 123 switch (this._curSection)
(...skipping 19 matching lines...) Expand all
140 } 143 }
141 finally 144 finally
142 { 145 {
143 Filter.knownFilters = origKnownFilters; 146 Filter.knownFilters = origKnownFilters;
144 Subscription.knownSubscriptions = origKnownSubscriptions; 147 Subscription.knownSubscriptions = origKnownSubscriptions;
145 } 148 }
146 } 149 }
147 } 150 }
148 151
149 exports.INIParser = INIParser; 152 exports.INIParser = INIParser;
OLDNEW
« no previous file with comments | « no previous file | test/filterStorage_readwrite.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld