summaryrefslogtreecommitdiff
path: root/sphinx/domains/javascript.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/domains/javascript.py
parentfef4faf50d51009160a7947eebd877fb44f6f862 (diff)
downloadsphinx-git-db87ed440c39f08800feb11a5e851674ab949c6b.tar.gz
Fix #648: Fix line numbers reported in warnings about undefined references.
Diffstat (limited to 'sphinx/domains/javascript.py')
-rw-r--r--sphinx/domains/javascript.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py
index e53eb5fd5..80d25ad0f 100644
--- a/sphinx/domains/javascript.py
+++ b/sphinx/domains/javascript.py
@@ -86,12 +86,11 @@ class JSObject(ObjectDescription):
self.state.document.note_explicit_target(signode)
objects = self.env.domaindata['js']['objects']
if fullname in objects:
- self.env.warn(
- self.env.docname,
+ self.state_machine.reporter.warning(
'duplicate object description of %s, ' % fullname +
'other instance in ' +
self.env.doc2path(objects[fullname][0]),
- self.lineno)
+ line=self.lineno)
objects[fullname] = self.env.docname, self.objtype
indextext = self.get_index_text(objectname, name_obj)