extra
Python-Markdown Extra Extension.
A compilation of various Python-Markdown extensions that imitates PHP Markdown Extra.
Note that each of the individual extensions still need to be available on your PYTHONPATH. This extension simply wraps them all up as a convenience so that only one extension needs to be listed when initiating Markdown. See the documentation for each individual extension for specifics about that extension.
There may be additional extensions that are distributed with
Python-Markdown that are not included here in Extra. Those extensions
are not part of PHP Markdown Extra, and therefore, not part of
Python-Markdown Extra. If you really would like Extra to include
additional extensions, we suggest creating your own clone of Extra
under a differant name. You could also edit the extensions
global
variable defined below, but be aware that such changes may be lost
when you upgrade to any future version of Python-Markdown.
See https://pythonhosted.org/Markdown/extensions/extra.html for documentation.
Copyright The Python Markdown Project
License: BSD
Attributes
extensions = ['markdown.extensions.smart_strong', 'markdown.extensions.fenced_code', 'markdown.extensions.footnotes', 'markdown.extensions.attr_list', 'markdown.extensions.def_list', 'markdown.extensions.tables', 'markdown.extensions.abbr']
module-attribute
Classes
ExtraExtension(*args, **kwargs)
Bases: Extension
Add various extensions to Markdown class.
Config is a dumb holder which gets passed to actual ext later.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/extra.py
Attributes
config = kwargs.pop('configs', {})
instance-attribute
Functions
getConfig(key, default='')
Return a setting for the given key or an empty string.
getConfigs()
getConfigInfo()
setConfig(key, value)
Set a config setting for key
with the given value
.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/__init__.py
setConfigs(items)
Set multiple config settings given a dict or list of tuples.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/__init__.py
extendMarkdown(md, md_globals)
Register extension instances.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/extra.py
MarkdownInHtmlProcessor(parser)
Bases: BlockProcessor
Process Markdown Inside HTML Blocks.
Source code in pyrevitlib/pyrevit/coreutils/markdown/blockprocessors.py
Attributes
parser = parser
instance-attribute
tab_length = parser.markdown.tab_length
instance-attribute
Functions
lastChild(parent)
detab(text)
Remove a tab from the front of each line of the given text.
Source code in pyrevitlib/pyrevit/coreutils/markdown/blockprocessors.py
looseDetab(text, level=1)
Remove a tab from front of lines but allowing dedented lines.