summaryrefslogtreecommitdiffstats
path: root/md_tw.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-01-02 00:25:42 +0000
committerrsiddharth <s@ricketyspace.net>2018-01-02 00:25:42 +0000
commit1c94dfabe07400c5b6991f2f4a3a46340a9cc3bd (patch)
treeddd01dea5691966f461131011db3e2dc58890600 /md_tw.py
parent75f60540ff0353bced58a332ab190d528cac2265 (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.
Diffstat (limited to 'md_tw.py')
-rw-r--r--md_tw.py12
1 files 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.
"""