Commits

Robert Lehmann  committed 46bdc37

Stop graphviz nodes from showing up twice in text builders.

  • Participants
  • Parent commits e90ab6e

Comments (0)

Files changed (1)

File sphinx/ext/graphviz.py

 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