Changeset - 7e252987e5a7
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2019-06-07 03:37:07
mads@kiilerich.com
lib: use Python dot notation for Markdown extensions

Gets rid of:

data/env/lib/python2.7/site-packages/markdown/__init__.py:259: DeprecationWarning: Using short names for Markdown's builtin extensions is deprecated. Use the full path to the extension with Python's dot notation (eg: "markdown.extensions.codehilite" instead of "codehilite"). The current behavior will raise an error in version 2.7. See the Release Notes for Python-Markdown version 2.6 for more info.
DeprecationWarning)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/markup_renderer.py
Show inline comments
 
@@ -193,14 +193,14 @@ class MarkupRenderer(object):
 
        source = safe_unicode(source)
 
        try:
 
            if flavored:
 
                source = cls._flavored_markdown(source)
 
            return markdown_mod.markdown(
 
                source,
 
                extensions=['codehilite', 'extra'],
 
                extension_configs={'codehilite': {'css_class': 'code-highlight'}})
 
                extensions=['markdown.extensions.codehilite', 'markdown.extensions.extra'],
 
                extension_configs={'markdown.extensions.codehilite': {'css_class': 'code-highlight'}})
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            if safe:
 
                log.debug('Falling back to render in plain mode')
 
                return cls.plain(source)
 
            else:
0 comments (0 inline, 0 general)