From 1c94dfabe07400c5b6991f2f4a3a46340a9cc3bd Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Tue, 2 Jan 2018 00:25:42 +0000 Subject: md_tw.py: `from mistune import ...` -> `import mistune` * md_tw.py (TWBlockLexer): Inherit from mistune.BlockLexer. (TWInlineLexer): Inherit from mistune.InlineLexer. (TWRenderer): Inherit from mistune.Renderer. (TWMarkdown): Inherit from mistune.Markdown. --- md_tw.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/md_tw.py b/md_tw.py index 9ebe609..c9c70c1 100644 --- a/md_tw.py +++ b/md_tw.py @@ -20,11 +20,11 @@ import textwrap -from mistune import BlockLexer, InlineLexer, Renderer, Markdown +import mistune -class TWBlockLexer(BlockLexer): - """Text Wrap Block level lexer for block grammars.""" +class TWBlockLexer(mistune.BlockLexer): + """Text Wrap Block lexer for block grammar.""" def __init__(self, rules=None, **kwargs): super(TWBlockLexer, self).__init__(rules, **kwargs) @@ -32,7 +32,7 @@ class TWBlockLexer(BlockLexer): self.default_rules = ['paragraph', 'text'] -class TWInlineLexer(InlineLexer): +class TWInlineLexer(mistune.InlineLexer): """Text Wrap Inline level lexer for inline gramars.""" def __init__(self, renderer, rules=None, **kwargs): @@ -46,7 +46,7 @@ class TWInlineLexer(InlineLexer): return text -class TWRenderer(Renderer): +class TWRenderer(mistune.Renderer): """Text Wrap Renderer.""" def __init__(self, **kwargs): @@ -89,7 +89,7 @@ class TWRenderer(Renderer): return '\n{}\n'.format(self._tw_fill(text)) -class TWMarkdown(Markdown): +class TWMarkdown(mistune.Markdown): """Text Wrap Markdown parser. """ -- cgit v1.2.3