diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2017-09-23 22:16:30 -0700 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-09-23 22:16:30 -0700 |
commit | 3d0b692517be185e825a4e55f485082235999a58 (patch) | |
tree | 4ca10dd48b31a34b9ca0da752ce723e61a7be414 /presentty/rst.py | |
parent | 308a06134d7749638c7ba3afcc4031f31ba09930 (diff) | |
download | presentty-urwid-monkeypatch.tar.gz presentty-urwid-monkeypatch.tar.xz presentty-urwid-monkeypatch.zip |
Monkeypatch urwid to allow for italics and strikethrough formattingpresentty-urwid-monkeypatch
Diffstat (limited to 'presentty/rst.py')
-rw-r--r-- | presentty/rst.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/presentty/rst.py b/presentty/rst.py index 5867ca1..53238e7 100644 --- a/presentty/rst.py +++ b/presentty/rst.py @@ -295,6 +295,12 @@ class UrwidTranslator(docutils.nodes.GenericNodeVisitor): def depart_emphasis(self, node): self.attr.pop() + def visit_strong(self, node): + self.attr.append(self.palette['strong']) + + def depart_strong(self, node): + self.attr.pop() + def visit_inline(self, node): cls = node.get('classes') if not cls: @@ -362,6 +368,7 @@ class UrwidTranslator(docutils.nodes.GenericNodeVisitor): if 'progressive' in node.get('classes'): self.progressives.pop() + class TransitionDirective(docutils.parsers.rst.Directive): required_arguments = 1 option_spec = {'duration': float} |