From 4b2714151442c64ff47047f36d357fee02eea175 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Wed, 27 Jun 2018 10:09:31 +1000 Subject: [PATCH] avoid injecting xrefs inside other xrefs --- sphinxcontrib/issuetracker/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sphinxcontrib/issuetracker/__init__.py b/sphinxcontrib/issuetracker/__init__.py index 56b15d2..4ad6226 100644 --- a/sphinxcontrib/issuetracker/__init__.py +++ b/sphinxcontrib/issuetracker/__init__.py @@ -135,6 +135,9 @@ def apply(self): if isinstance(parent, (nodes.literal, nodes.FixedTextElement)): # ignore inline and block literal text continue + if isinstance(parent, nodes.reference): + # we don't want to inject a link inside another link + continue text = text_type(node) new_nodes = [] last_issue_ref_end = 0