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

Side by Side Diff: cms/converters.py

Issue 5168575279005696: Issue 2134 - Drop support for .raw file extension for raw HTML (Closed)
Patch Set: Created March 13, 2015, 5 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, # deprecated, will be removed soon
339 "html": RawConverter, 338 "html": RawConverter,
340 "md": MarkdownConverter, 339 "md": MarkdownConverter,
341 "tmpl": TemplateConverter, 340 "tmpl": TemplateConverter,
342 } 341 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld