attr_list
Attribute List Extension for Python-Markdown.
Adds attribute list syntax. Inspired by maruku's feature of the same name.
See https://pythonhosted.org/Markdown/extensions/attr_list.html for documentation.
Original code Copyright 2011 Waylan Limberg.
All changes Copyright 2011-2014 The Python Markdown Project
License: BSD
Classes
AttrListTreeprocessor(markdown_instance=None)
Bases: Treeprocessor
Attribute List Tree processor.
Source code in pyrevitlib/pyrevit/coreutils/markdown/util.py
Attributes
markdown = markdown_instance
instance-attribute
BASE_RE = '\\{\\:?([^\\}\\n]*)\\}'
class-attribute
instance-attribute
HEADER_RE = re.compile('[ ]+%s[ ]*$' % BASE_RE)
class-attribute
instance-attribute
BLOCK_RE = re.compile('\\n[ ]*%s[ ]*$' % BASE_RE)
class-attribute
instance-attribute
INLINE_RE = re.compile('^%s' % BASE_RE)
class-attribute
instance-attribute
NAME_RE = re.compile('[^A-Z_a-z\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u02ff\\u0370-\\u037d\\u037f-\\u1fff\\u200c-\\u200d\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd\\:\\-\\.0-9\\u00b7\\u0300-\\u036f\\u203f-\\u2040]+')
class-attribute
instance-attribute
Functions
run(doc)
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/attr_list.py
assign_attrs(elem, attrs)
Assign attrs to element.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/attr_list.py
sanitize_name(name)
Sanitize name as 'an XML Name, minus the ":"'.
See http://www.w3.org/TR/REC-xml-names/#NT-NCName.
AttrListExtension(*args, **kwargs)
Bases: Extension
Attribute List Extension.
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.