Fix #6028: graphviz: Ensure the graphviz filenames are reproducible

This commit is contained in:
Takeshi KOMIYA 2019-02-27 23:20:40 +09:00
parent 836d65f04c
commit 6f973d410b
2 changed files with 2 additions and 3 deletions

View File

@ -21,6 +21,7 @@ Bugs fixed
* #6046: LaTeX: ``TypeError`` is raised when invalid latex_elements given
* #6019: imgconverter: Including multipage PDF fails
* #6047: autodoc: ``autofunction`` emits a warning for method objects
* #6028: graphviz: Ensure the graphviz filenames are reproducible
Testing
--------

View File

@ -194,9 +194,7 @@ class GraphvizSimple(SphinxDirective):
node = graphviz()
node['code'] = '%s %s {\n%s\n}\n' % \
(self.name, self.arguments[0], '\n'.join(self.content))
node['options'] = {
'docname': path.splitext(self.state.document.current_source)[0],
}
node['options'] = {'docname': self.env.docname}
if 'graphviz_dot' in self.options:
node['options']['graphviz_dot'] = self.options['graphviz_dot']
if 'alt' in self.options: