markdown-textwrap

text wrap markdown documents
git clone git://git.ricketyspace.net/markdown-textwrap.git
Log | Files | Refs

commit 1c94dfabe07400c5b6991f2f4a3a46340a9cc3bd
parent 75f60540ff0353bced58a332ab190d528cac2265
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue,  2 Jan 2018 00:25:42 +0000

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.

Diffstat:
md_tw.py | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 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. """