mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make text writer skip raw nodes it doesn't know about.
This commit is contained in:
parent
e4d457396e
commit
acd679857c
@ -712,5 +712,10 @@ class TextTranslator(nodes.NodeVisitor):
|
||||
# only valid for HTML
|
||||
raise nodes.SkipNode
|
||||
|
||||
def visit_raw(self, node):
|
||||
if 'text' in node.get('format', '').split():
|
||||
self.body.append(node.astext())
|
||||
raise nodes.SkipNode
|
||||
|
||||
def unknown_visit(self, node):
|
||||
raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
|
||||
|
Loading…
Reference in New Issue
Block a user