meta
Meta Data Extension for Python-Markdown.
This extension adds Meta Data handling to markdown.
See https://pythonhosted.org/Markdown/extensions/meta_data.html for documentation.
Original code Copyright 2007-2008 Waylan Limberg.
All changes Copyright 2008-2014 The Python Markdown Project
License: BSD
Attributes
log = logging.getLogger('MARKDOWN')
module-attribute
META_RE = re.compile('^[ ]{0,3}(?P<key>[A-Za-z0-9_-]+):\\s*(?P<value>.*)')
module-attribute
META_MORE_RE = re.compile('^[ ]{4,}(?P<value>.*)')
module-attribute
BEGIN_RE = re.compile('^-{3}(\\s.*)?')
module-attribute
END_RE = re.compile('^(-{3}|\\.{3})(\\s.*)?')
module-attribute
Classes
MetaExtension(*args, **kwargs)
Bases: Extension
Meta-Data extension for Python-Markdown.
Initiate Extension and set up configs.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/__init__.py
Attributes
config = {}
class-attribute
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)
MetaPreprocessor(markdown_instance=None)
Bases: Preprocessor
Get Meta-Data.
Source code in pyrevitlib/pyrevit/coreutils/markdown/util.py
Attributes
markdown = markdown_instance
instance-attribute
Functions
run(lines)
Parse Meta-Data and store in Markdown.Meta.