summaryrefslogtreecommitdiff
path: root/sphinx/ext/mathbase.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-15 09:48:15 +0100
committerGeorg Brandl <georg@python.org>2011-01-15 09:48:15 +0100
commit215ea1b5af7a44b7740591f9c4e7872ede3b37d9 (patch)
tree0e89ad19afe2f58de6fbe4c9c7cb4f31fc14e5ef /sphinx/ext/mathbase.py
parent9b1d8f6ce4c9c197a662e2e6b7641789d2c312df (diff)
downloadsphinx-215ea1b5af7a44b7740591f9c4e7872ede3b37d9.tar.gz
Fix for docutils versions without directive.src attribute.
Diffstat (limited to 'sphinx/ext/mathbase.py')
-rw-r--r--sphinx/ext/mathbase.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/mathbase.py b/sphinx/ext/mathbase.py
index e7258300..e7ea82d7 100644
--- a/sphinx/ext/mathbase.py
+++ b/sphinx/ext/mathbase.py
@@ -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)