mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix handling of non-text field types.
This commit is contained in:
parent
4a400034d9
commit
fb0e13e0ec
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user