Merge pull request #5323 from tk0miya/dont_use_document.current_source

graphviz: Don't use document.current_source
This commit is contained in:
Takeshi KOMIYA
2018-08-22 20:52:58 +09:00
committed by GitHub

View File

@@ -156,9 +156,7 @@ class Graphviz(SphinxDirective):
line=self.lineno)]
node = graphviz()
node['code'] = dotcode
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']