abbr
Abbreviation Extension for Python-Markdown.
This extension adds abbreviation handling to Python-Markdown.
See https://pythonhosted.org/Markdown/extensions/abbreviations.html for documentation.
Oringinal code Copyright 2007-2008 Waylan Limberg and Seemant Kulleen
All changes Copyright 2008-2014 The Python Markdown Project
License: BSD
Attributes
ABBR_REF_RE = re.compile('[*]\\[(?P<abbr>[^\\]]*)\\][ ]?:\\s*(?P<title>.*)')
module-attribute
Classes
AbbrExtension(*args, **kwargs)
Bases: Extension
Abbreviation 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)
Insert AbbrPreprocessor before ReferencePreprocessor.
AbbrPreprocessor(markdown_instance=None)
Bases: Preprocessor
Abbreviation Preprocessor - parse text for abbr references.
Source code in pyrevitlib/pyrevit/coreutils/markdown/util.py
Attributes
markdown = markdown_instance
instance-attribute
Functions
run(lines)
Find and remove all Abbreviation references from the text.
Each reference is set as a new AbbrPattern in the markdown instance.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/abbr.py
AbbrPattern(pattern, title)
Bases: Pattern
Abbreviation inline pattern.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/abbr.py
Attributes
pattern = pattern
instance-attribute
compiled_re = re.compile('^(.*?)%s(.*)$' % pattern, re.DOTALL | re.UNICODE)
instance-attribute
safe_mode = False
instance-attribute
markdown = markdown_instance
instance-attribute
title = title
instance-attribute
Functions
getCompiledRegExp()
type()
unescape(text)
Return unescaped text given text with an inline placeholder.