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

Side by Side Diff: trunk/src/third_party/markdown/extensions/extra.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 """
2 Python-Markdown Extra Extension
3 ===============================
4
5 A compilation of various Python-Markdown extensions that imitates
6 [PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/).
7
8 Note that each of the individual extensions still need to be available
9 on your PYTHONPATH. This extension simply wraps them all up as a
10 convenience so that only one extension needs to be listed when
11 initiating Markdown. See the documentation for each individual
12 extension for specifics about that extension.
13
14 In the event that one or more of the supported extensions are not
15 available for import, Markdown will issue a warning and simply continue
16 without that extension.
17
18 There may be additional extensions that are distributed with
19 Python-Markdown that are not included here in Extra. Those extensions
20 are not part of PHP Markdown Extra, and therefore, not part of
21 Python-Markdown Extra. If you really would like Extra to include
22 additional extensions, we suggest creating your own clone of Extra
23 under a differant name. You could also edit the `extensions` global
24 variable defined below, but be aware that such changes may be lost
25 when you upgrade to any future version of Python-Markdown.
26
27 """
28
29 from __future__ import absolute_import
30 from __future__ import unicode_literals
31 from . import Extension
32
33 extensions = ['smart_strong',
34 'fenced_code',
35 'footnotes',
36 'attr_list',
37 'def_list',
38 'tables',
39 'abbr',
40 ]
41
42
43 class ExtraExtension(Extension):
44 """ Add various extensions to Markdown class."""
45
46 def extendMarkdown(self, md, md_globals):
47 """ Register extension instances. """
48 md.registerExtensions(extensions, self.config)
49 if not md.safeMode:
50 # Turn on processing of markdown text within raw html
51 md.preprocessors['html_block'].markdown_in_raw = True
52
53 def makeExtension(configs={}):
54 return ExtraExtension(configs=dict(configs))
OLDNEW
« no previous file with comments | « trunk/src/third_party/markdown/extensions/def_list.py ('k') | trunk/src/third_party/markdown/extensions/fenced_code.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698