diff options
author | Georg Brandl <georg@python.org> | 2010-07-27 17:58:01 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-07-27 17:58:01 +0200 |
commit | fb0e13e0ecaa170c33ea277b3ba8c6892863d459 (patch) | |
tree | 07f8819812e805e932d5c9197585493d51be45b0 /sphinx/util/docfields.py | |
parent | 4a400034d9d255d0c8da7d824d8038c2d90a71b2 (diff) | |
download | sphinx-git-fb0e13e0ecaa170c33ea277b3ba8c6892863d459.tar.gz |
Fix handling of non-text field types.
Diffstat (limited to 'sphinx/util/docfields.py')
-rw-r--r-- | sphinx/util/docfields.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py index 1ae49c6c5..9eafde0ac 100644 --- a/sphinx/util/docfields.py +++ b/sphinx/util/docfields.py @@ -141,9 +141,12 @@ class TypedField(GroupedField): par = nodes.paragraph() par += self.make_xref(self.rolename, domain, fieldarg, nodes.strong) if fieldarg in types: - typename = u''.join(n.astext() for n in types[fieldarg]) par += nodes.Text(' (') - par += self.make_xref(self.typerolename, domain, typename) + if len(fieldtype) == 1 and isinstance(fieldtype[0], nodes.Text): + typename = u''.join(n.astext() for n in types[fieldarg]) + par += self.make_xref(self.typerolename, domain, typename) + else: + par += fieldtype par += nodes.Text(')') par += nodes.Text(' -- ') par += content |