wikilinks
WikiLinks Extension for Python-Markdown.
Converts [[WikiLinks]] to relative links.
See https://pythonhosted.org/Markdown/extensions/wikilinks.html for documentation.
Original code Copyright Waylan Limberg.
All changes Copyright The Python Markdown Project
License: BSD
Classes
WikiLinkExtension(*args, **kwargs)
Bases: Extension
WikiLinks markdown extension.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/wikilinks.py
Attributes
config = {'base_url': ['/', 'String to append to beginning or URL.'], 'end_url': ['/', 'String to append to end of URL.'], 'html_class': ['wikilink', 'CSS hook. Leave blank for none.'], 'build_url': [build_url, 'Callable formats URL from label.']}
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)
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/wikilinks.py
WikiLinks(pattern, config)
Bases: Pattern
WikiLinks parser.
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/wikilinks.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
config = config
instance-attribute
Functions
getCompiledRegExp()
type()
unescape(text)
Return unescaped text given text with an inline placeholder.
Source code in pyrevitlib/pyrevit/coreutils/markdown/inlinepatterns.py
handleMatch(m)
Source code in pyrevitlib/pyrevit/coreutils/markdown/extensions/wikilinks.py
Functions
build_url(label, base, end)
Build a url from the label, a base, and an end.