From 1a1f73547851e9bb51120fdaf35d86dae2e66873 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 16 Dec 2015 02:50:17 -0800 Subject: [PATCH] sphinx.ext.graphviz: use instead of to embed svg If svg files are embedded in in html, all interactive features are lost, which graphviz is able to produce. This commit replace with for svg files. Close #967 --- sphinx/ext/graphviz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index 3970edc077..e0c73ecd8d 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -223,7 +223,8 @@ def render_dot_html(self, node, code, options, prefix='graphviz', alt = node.get('alt', self.encode(code).strip()) imgcss = imgcls and 'class="%s"' % imgcls or '' if format == 'svg': - svgtag = '%s\n' % (fname, alt, imgcss) + svgtag = ''' +

%s

\n''' % (fname, alt) self.body.append(svgtag) else: mapfile = open(outfn + '.map', 'rb')