summaryrefslogtreecommitdiff
path: root/sphinx/ext/mathbase.py
diff options
context:
space:
mode:
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 1a2ca6afe..6d080b4ba 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
@@ -72,7 +73,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']: