]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - Documentation/sphinx/automarkup.py
docs: automarkup.py: ignore exceptions when seeking for xrefs
[linux.git] / Documentation / sphinx / automarkup.py
index b300cf129869ec37929c61ae21bc998a870b2ae7..77e89c1956d7dacbe69142665305ccf7cb0cf06c 100644 (file)
@@ -6,6 +6,7 @@
 #
 from docutils import nodes
 from sphinx import addnodes
+from sphinx.environment import NoUri
 import re
 
 #
@@ -55,8 +56,15 @@ def markup_funcs(docname, app, node):
                                           reftype = 'function',
                                           reftarget = target, modname = None,
                                           classname = None)
-            xref = cdom.resolve_xref(app.env, docname, app.builder,
-                                     'function', target, pxref, lit_text)
+            #
+            # XXX The Latex builder will throw NoUri exceptions here,
+            # work around that by ignoring them.
+            #
+            try:
+                xref = cdom.resolve_xref(app.env, docname, app.builder,
+                                         'function', target, pxref, lit_text)
+            except NoUri:
+                xref = None
         #
         # Toss the xref into the list if we got it; otherwise just put
         # the function text.