Disallow structural changes to TextElements; replace their children instead.

This commit is contained in:
Robert Lehmann 2010-06-30 12:50:34 +02:00
parent 1433b5cb11
commit 8a5af56e62

View File

@ -767,7 +767,8 @@ class BuildEnvironment:
patch = new_document(source, settings)
msgstr = translation.ugettext(msg)
parser.parse(msgstr, patch)
ctx.replace(node, patch.children)
assert isinstance(patch[0], nodes.paragraph)
node.children = patch[0].children
def process_dependencies(self, docname, doctree):