Merge pull request #6980 from tk0miya/6583_improve_NoUri

Be precise about which document is missing.
This commit is contained in:
Takeshi KOMIYA 2020-01-01 21:53:41 +09:00 committed by GitHub
commit efe18663b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -138,7 +138,7 @@ class LaTeXBuilder(Builder):
def get_target_uri(self, docname: str, typ: str = None) -> str:
if docname not in self.docnames:
raise NoUri
raise NoUri(docname, typ)
else:
return '%' + docname

View File

@ -53,7 +53,7 @@ class ManualPageBuilder(Builder):
def get_target_uri(self, docname: str, typ: str = None) -> str:
if typ == 'token':
return ''
raise NoUri
raise NoUri(docname, typ)
@progress_message(__('writing'))
def write(self, *ignored: Any) -> None:

View File

@ -63,7 +63,7 @@ class TexinfoBuilder(Builder):
def get_target_uri(self, docname: str, typ: str = None) -> str:
if docname not in self.docnames:
raise NoUri
raise NoUri(docname, typ)
else:
return '%' + docname

View File

@ -6857,7 +6857,7 @@ class CPPDomain(Domain):
if s is None or s.declaration is None:
txtName = str(name)
if txtName.startswith('std::') or txtName == 'std':
raise NoUri()
raise NoUri(txtName, typ)
return None, None
if typ.startswith('cpp:'):

View File

@ -82,7 +82,7 @@ class ReferencesResolver(SphinxPostTransform):
try:
domain = self.env.domains[node['refdomain']]
except KeyError:
raise NoUri
raise NoUri(target, typ)
newnode = domain.resolve_xref(self.env, refdoc, self.app.builder,
typ, target, node, contnode)
# really hardwired reference types