summaryrefslogtreecommitdiff
path: root/sphinx/ext/mathbase.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-09-23 09:46:24 +0200
committerGeorg Brandl <georg@python.org>2011-09-23 09:46:24 +0200
commitdb87ed440c39f08800feb11a5e851674ab949c6b (patch)
treef139be5f44c251ed99b0d2a43afbd047d8d8f279 /sphinx/ext/mathbase.py
parentfef4faf50d51009160a7947eebd877fb44f6f862 (diff)
downloadsphinx-git-db87ed440c39f08800feb11a5e851674ab949c6b.tar.gz
Fix #648: Fix line numbers reported in warnings about undefined references.
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 e7ea82d7c..fc8495845 100644
--- a/sphinx/ext/mathbase.py
+++ b/sphinx/ext/mathbase.py
@@ -12,6 +12,7 @@
from docutils import nodes, utils
from docutils.parsers.rst import directives
+from sphinx.util.nodes import set_source_info
from sphinx.util.compat import Directive
@@ -69,7 +70,7 @@ class MathDirective(Directive):
node['nowrap'] = 'nowrap' in self.options
node['docname'] = self.state.document.settings.env.docname
ret = [node]
- node.line = self.lineno
+ set_source_info(self, node)
if hasattr(self, 'src'):
node.source = self.src
if node['label']: