From 7f5c68c0f254b03137cb835c4bc3ed4c9fb8e4e4 2014-07-17 17:06:10 From: Thomas Kluyver Date: 2014-07-17 17:06:10 Subject: [PATCH] Rename mistune renderer class --- diff --git a/IPython/nbconvert/filters/markdown.py b/IPython/nbconvert/filters/markdown.py index 843205a..d5731a2 100755 --- a/IPython/nbconvert/filters/markdown.py +++ b/IPython/nbconvert/filters/markdown.py @@ -116,7 +116,7 @@ class MarkdownWithMath(mistune.Markdown): def parse_block_math(self): return self.renderer.block_math(self.token['text']) -class MyRenderer(mistune.Renderer): +class IPythonRenderer(mistune.Renderer): def block_code(self, code, lang): if not lang: return '\n
%s
\n' % \ @@ -134,7 +134,7 @@ class MyRenderer(mistune.Renderer): def markdown2html_mistune(source): """Convert a markdown string to HTML using mistune""" - return MarkdownWithMath(renderer=MyRenderer()).render(source) + return MarkdownWithMath(renderer=IPythonRenderer()).render(source) def markdown2html_pandoc(source): """Convert a markdown string to HTML via pandoc"""