mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-15 01:42:12 -05:00
Fix for docutils versions without directive.src attribute.
This commit is contained in:
1 parent
a9728cb3e5
commit
130c6bd0b2
1 file changed
+2
-1
@@ -70,7 +70,8 @@ class MathDirective(Directive):
|
||||
node['docname'] = self.state.document.settings.env.docname
|
||||
ret = [node]
|
||||
node.line = self.lineno
|
||||
node.source = self.src
|
||||
if hasattr(self, 'src'):
|
||||
node.source = self.src
|
||||
if node['label']:
|
||||
tnode = nodes.target('', '', ids=['equation-' + node['label']])
|
||||
self.state.document.note_explicit_target(tnode)
|
||||
|
||||
Reference in new issue
Block a user