summaryrefslogtreecommitdiff
path: root/sphinx/domains/std.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/domains/std.py')
-rw-r--r--sphinx/domains/std.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
index b9da29b8..389134cc 100644
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -408,9 +408,8 @@ class StandardDomain(Domain):
# link and object descriptions
continue
if name in labels:
- env.warn(docname, 'duplicate label %s, ' % name +
- 'other instance in ' + env.doc2path(labels[name][0]),
- node.line)
+ env.warn_node('duplicate label %s, ' % name + 'other instance '
+ 'in ' + env.doc2path(labels[name][0]), node)
anonlabels[name] = docname, labelid
if node.tagname == 'section':
sectname = clean_astext(node[0]) # node[0] == title node