Left: | ||
Right: |
OLD | NEW |
---|---|
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This file is part of the Adblock Plus web scripts, | 3 # This file is part of the Adblock Plus web scripts, |
4 # Copyright (C) 2006-2015 Eyeo GmbH | 4 # Copyright (C) 2006-2015 Eyeo GmbH |
5 # | 5 # |
6 # Adblock Plus is free software: you can redistribute it and/or modify | 6 # Adblock Plus is free software: you can redistribute it and/or modify |
7 # it under the terms of the GNU General Public License version 3 as | 7 # it under the terms of the GNU General Public License version 3 as |
8 # published by the Free Software Foundation. | 8 # published by the Free Software Foundation. |
9 # | 9 # |
10 # Adblock Plus is distributed in the hope that it will be useful, | 10 # Adblock Plus is distributed in the hope that it will be useful, |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 structured = [] | 328 structured = [] |
329 stack = [{"level": 0, "subitems": structured}] | 329 stack = [{"level": 0, "subitems": structured}] |
330 for item in flat: | 330 for item in flat: |
331 while stack[-1]["level"] >= item["level"]: | 331 while stack[-1]["level"] >= item["level"]: |
332 stack.pop() | 332 stack.pop() |
333 stack[-1]["subitems"].append(item) | 333 stack[-1]["subitems"].append(item) |
334 stack.append(item) | 334 stack.append(item) |
335 return structured | 335 return structured |
336 | 336 |
337 converters = { | 337 converters = { |
338 "raw": RawConverter, | 338 "raw": RawConverter, |
Sebastian Noack
2015/03/12 20:05:10
Should you remove the old extension?
Wladimir Palant
2015/03/12 20:46:28
As I said in the issue description - we have repos
Sebastian Noack
2015/03/12 20:48:09
Sorry, too late, but please add a comment above th
Wladimir Palant
2015/03/12 20:59:11
Done.
| |
339 "html": RawConverter, | |
339 "md": MarkdownConverter, | 340 "md": MarkdownConverter, |
340 "tmpl": TemplateConverter, | 341 "tmpl": TemplateConverter, |
341 } | 342 } |
OLD | NEW |