mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-12 16:32:10 -05:00
Stop graphviz nodes from showing up twice in text builders.
This commit is contained in:
1 parent
c85a5d0813
commit
d4fe56eafb
1 file changed
+5
-3
@@ -298,14 +298,16 @@ def texinfo_visit_graphviz(self, node):
|
||||
def text_visit_graphviz(self, node):
|
||||
if 'alt' in node.attributes:
|
||||
self.add_text(_('[graph: %s]') % node['alt'])
|
||||
self.add_text(_('[graph]'))
|
||||
else:
|
||||
self.add_text(_('[graph]'))
|
||||
raise nodes.SkipNode
|
||||
|
||||
|
||||
def man_visit_graphviz(self, node):
|
||||
if 'alt' in node.attributes:
|
||||
self.body.append(_('[graph: %s]') % node['alt'] + '\n')
|
||||
self.body.append(_('[graph]'))
|
||||
self.body.append(_('[graph: %s]') % node['alt'])
|
||||
else:
|
||||
self.body.append(_('[graph]'))
|
||||
raise nodes.SkipNode
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user