summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakayuki Shimizukawa <shimizukawa@gmail.com>2014-03-02 16:02:46 +0900
committerTakayuki Shimizukawa <shimizukawa@gmail.com>2014-03-02 16:02:46 +0900
commitc68104b1be74b8b102a2f3bf394e03072c760cfa (patch)
treed426cf87598a33fd1fa4f482010a0459a5d6cac7
parent194e50fd2d0fee64c63a5374746c28edafb40444 (diff)
downloadsphinx-git-c68104b1be74b8b102a2f3bf394e03072c760cfa.tar.gz
Fix a change of pull request #96 that break sphinx.util.docfields.Field.make_field interface/behavior for `item` argument usage. Closes #1367
-rw-r--r--CHANGES2
-rw-r--r--sphinx/util/docfields.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index 61f1475b0..cbeb2a155 100644
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,8 @@ Bugs fixed
mechanism.
* #1370: Ignore "toctree" nodes in text writer, instead of raising.
* #1364: Fix 'make gettext' fails when the '.. todolist::' directive is present.
+* #1367: Fix a change of PR#96 that break sphinx.util.docfields.Field.make_field
+ interface/behavior for `item` argument usage.
Documentation
-------------
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py
index 9cd176b84..d6f46ab99 100644
--- a/sphinx/util/docfields.py
+++ b/sphinx/util/docfields.py
@@ -67,7 +67,7 @@ class Field(object):
fieldname += nodes.Text(' ')
fieldname += self.make_xref(self.rolename, domain,
fieldarg, nodes.Text)
- fieldbody = nodes.field_body('', nodes.paragraph('', '', content))
+ fieldbody = nodes.field_body('', nodes.paragraph('', '', *content))
return nodes.field('', fieldname, fieldbody)
@@ -272,10 +272,10 @@ class DocFieldTransformer(object):
groupindices[typename] = len(entries)
group = [typedesc, []]
entries.append(group)
- entry = typedesc.make_entry(fieldarg, translatable_content)
+ entry = typedesc.make_entry(fieldarg, [translatable_content])
group[1].append(entry)
else:
- entry = typedesc.make_entry(fieldarg, translatable_content)
+ entry = typedesc.make_entry(fieldarg, [translatable_content])
entries.append([typedesc, entry])
# step 2: all entries are collected, construct the new field list