headerid
HeaderID Extension for Python-Markdown.
Auto-generate id attributes for HTML headers.
See https://pythonhosted.org/Markdown/extensions/header_id.html for documentation.
Original code Copyright 2007-2011 Waylan Limberg.
All changes Copyright 2011-2014 The Python Markdown Project
License: BSD
Classes
HeaderIdTreeprocessor(markdown_instance=None)
Bases: Treeprocessor
Assign IDs to headers.
Source code in pyrevitlib/pyrevit/coreutils/markdown/util.py
Attributes
markdown = markdown_instance
instance-attribute
IDs = set()
class-attribute
instance-attribute
Functions
run(doc)
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/headerid.py
HeaderIdExtension(*args, **kwargs)
Bases: Extension
Header ID extension.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/headerid.py
Attributes
config = {'level': ['1', 'Base level for headers.'], 'forceid': ['True', 'Force all headers to have an id.'], 'separator': ['-', 'Word separator.'], 'slugify': [slugify, 'Callable to generate anchors']}
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.