summaryrefslogtreecommitdiff
path: root/sphinx/util
diff options
context:
space:
mode:
authorNozomu Kaneko <nozom.kaneko@gmail.com>2012-12-31 23:31:15 +0900
committerNozomu Kaneko <nozom.kaneko@gmail.com>2012-12-31 23:31:15 +0900
commita2886594ee5620e93d8561cbb73433f2588ba1d8 (patch)
tree3c861e8d2ea2c7239b50217c1bc356a7acc74625 /sphinx/util
parent0cdf9c478c2a76ecd93fc69a6602881f081cd4db (diff)
downloadsphinx-a2886594ee5620e93d8561cbb73433f2588ba1d8.tar.gz
use `paragraph` nodes instead of `translatable` nodes.
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/docfields.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py
index 79326477..1de6a687 100644
--- a/sphinx/util/docfields.py
+++ b/sphinx/util/docfields.py
@@ -67,9 +67,7 @@ class Field(object):
fieldname += nodes.Text(' ')
fieldname += self.make_xref(self.rolename, domain,
fieldarg, nodes.Text)
- par = nodes.paragraph()
- par += content
- fieldbody = nodes.field_body('', par)
+ fieldbody = nodes.field_body('', nodes.paragraph('', '', content))
return nodes.field('', fieldname, fieldbody)
@@ -257,7 +255,8 @@ class DocFieldTransformer(object):
[nodes.Text(argtype)]
fieldarg = argname
- translatable_content = addnodes.translatable(fieldbody.rawsource)
+ translatable_content = nodes.paragraph(fieldbody.rawsource,
+ removable=True)
translatable_content.source = fieldbody.parent.source
translatable_content.line = fieldbody.parent.line
translatable_content += content