in plugins/md_inline_extension/inline.py [0:0]
def inline_markdown_extension(pelicanobj, config):
"""Instantiates a customized Markdown extension"""
# Instantiate Markdown extension and append it to the current extensions
try:
if isinstance(pelicanobj.settings.get('MD_EXTENSIONS'), list): # pelican 3.6.3 and earlier
pelicanobj.settings['MD_EXTENSIONS'].append(PelicanInlineMarkdownExtension(config))
else:
pelicanobj.settings['MARKDOWN'].setdefault('extensions', []).append(PelicanInlineMarkdownExtension(config))
except Exception: # TODO: narrow further to expected Exceptions
sys.excepthook(*sys.exc_info())
sys.stderr.write("\nError - the pelican Markdown extension failed to configure. Inline Markdown extension is non-functional.\n")
sys.stderr.flush()