Always warn on missing :doc: or citation references.

This commit is contained in:
Georg Brandl 2011-01-08 17:59:44 +01:00
parent a20b68cd3e
commit 8814e97389
2 changed files with 3 additions and 2 deletions

View File

@ -189,7 +189,8 @@ class CitationReferences(Transform):
for citnode in self.document.traverse(nodes.citation_reference):
cittext = citnode.astext()
refnode = addnodes.pending_xref(cittext, reftype='citation',
reftarget=cittext)
reftarget=cittext, refwarn=True)
refnode.line = citnode.line or citnode.parent.line
refnode += nodes.Text('[' + cittext + ']')
citnode.parent.replace(citnode, refnode)

View File

@ -300,7 +300,7 @@ specific_docroles = {
# links to download references
'download': XRefRole(nodeclass=addnodes.download_reference),
# links to documents
'doc': XRefRole(),
'doc': XRefRole(warn_dangling=True),
'pep': indexmarkup_role,
'rfc': indexmarkup_role,