graphviz: Don't use document.current_source

This commit is contained in:
Takeshi KOMIYA 2018-08-21 21:59:16 +09:00
parent 4fcc64423d
commit 00f476040e

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']