summaryrefslogtreecommitdiff
path: root/sphinx/util/docfields.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-22 15:03:12 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-22 15:24:14 +0900
commitc0fffb9e8bbe64f766da691e55ced4c16197d402 (patch)
tree7b3c830577914baaa067cc48dcb8deef6922c51d /sphinx/util/docfields.py
parenta2748f787c5f9ba0d860719be59d80d08e14b3e9 (diff)
downloadsphinx-git-c0fffb9e8bbe64f766da691e55ced4c16197d402.tar.gz
Fix #5432: py domain: :type: field can't process :term: references
Diffstat (limited to 'sphinx/util/docfields.py')
-rw-r--r--sphinx/util/docfields.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py
index 202616337..2b8cb6425 100644
--- a/sphinx/util/docfields.py
+++ b/sphinx/util/docfields.py
@@ -305,7 +305,8 @@ class DocFieldTransformer(object):
entries.append(field)
# but if this has a type then we can at least link it
- if typedesc and is_typefield and content:
+ if (typedesc and is_typefield and content and
+ len(content) == 1 and isinstance(content[0], nodes.Text)):
target = content[0].astext()
xrefs = typedesc.make_xrefs(
typedesc.typerolename,