diff options
author | rsiddharth <s@ricketyspace.net> | 2018-01-02 00:25:42 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2018-01-02 00:25:42 +0000 |
commit | 1c94dfabe07400c5b6991f2f4a3a46340a9cc3bd (patch) | |
tree | ddd01dea5691966f461131011db3e2dc58890600 | |
parent | 75f60540ff0353bced58a332ab190d528cac2265 (diff) |
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.
-rw-r--r-- | md_tw.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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. """ |