Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Unified Diff: trunk/src/third_party/markdown/extensions/sane_lists.py

Issue 132753002: Revert 243980 "Docserver: Support markdown for HTML content." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/third_party/markdown/extensions/sane_lists.py
===================================================================
--- trunk/src/third_party/markdown/extensions/sane_lists.py (revision 244009)
+++ trunk/src/third_party/markdown/extensions/sane_lists.py (working copy)
@@ -1,51 +0,0 @@
-"""
-Sane List Extension for Python-Markdown
-=======================================
-
-Modify the behavior of Lists in Python-Markdown t act in a sane manor.
-
-In standard Markdown sytex, the following would constitute a single
-ordered list. However, with this extension, the output would include
-two lists, the first an ordered list and the second and unordered list.
-
- 1. ordered
- 2. list
-
- * unordered
- * list
-
-Copyright 2011 - [Waylan Limberg](http://achinghead.com)
-
-"""
-
-from __future__ import absolute_import
-from __future__ import unicode_literals
-from . import Extension
-from ..blockprocessors import OListProcessor, UListProcessor
-import re
-
-
-class SaneOListProcessor(OListProcessor):
-
- CHILD_RE = re.compile(r'^[ ]{0,3}((\d+\.))[ ]+(.*)')
- SIBLING_TAGS = ['ol']
-
-
-class SaneUListProcessor(UListProcessor):
-
- CHILD_RE = re.compile(r'^[ ]{0,3}(([*+-]))[ ]+(.*)')
- SIBLING_TAGS = ['ul']
-
-
-class SaneListExtension(Extension):
- """ Add sane lists to Markdown. """
-
- def extendMarkdown(self, md, md_globals):
- """ Override existing Processors. """
- md.parser.blockprocessors['olist'] = SaneOListProcessor(md.parser)
- md.parser.blockprocessors['ulist'] = SaneUListProcessor(md.parser)
-
-
-def makeExtension(configs={}):
- return SaneListExtension(configs=configs)
-
« no previous file with comments | « trunk/src/third_party/markdown/extensions/nl2br.py ('k') | trunk/src/third_party/markdown/extensions/smart_strong.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698