Commits

Anonymous committed 1fef172

pending_xrefs need a lot of work

  • Participants
  • Parent commits 735403b

Comments (0)

Files changed (1)

sphinx/builders/pdf.py

 
 
         for pendingnode in tree.traverse(addnodes.pending_xref):
-            pendingnode.replace_self(nodes.reference(text=pendingnode.astext(),
-                refuri=pendingnode['reftarget']))
+            # This needs work, need to keep track of all targets
+            # so I don't replace and create hanging refs, which
+            # crash
+            print "REPLACING:",pendingnode
+            if pendingnode['reftype']=='ref':
+                pendingnode.replace_self(nodes.reference(text=pendingnode.astext(),
+                    refuri=pendingnode['reftarget']))
+            else: 
+                pass
         return tree