summaryrefslogtreecommitdiff
path: root/sphinx/util/docfields.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-22 16:34:41 +0900
committerGitHub <noreply@github.com>2018-09-22 16:34:41 +0900
commite1ac2eebfbfac2e6001af849cfd4358e3fac6fd7 (patch)
treea75fedcd8f58ec6470c04272a8582c78f232fc87 /sphinx/util/docfields.py
parent2f4047af785a46e972f5b23004641c8c66b405b9 (diff)
parent52e68a79b5bc88aa76d7fa502f44cb318a740958 (diff)
downloadsphinx-git-e1ac2eebfbfac2e6001af849cfd4358e3fac6fd7.tar.gz
Merge branch '1.8' into 5426_TypeError_for_class_attributes
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 c4fc1c487..94968e148 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,