mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Disallow structural changes to TextElements; replace their children instead.
This commit is contained in:
@@ -767,7 +767,8 @@ class BuildEnvironment:
|
|||||||
patch = new_document(source, settings)
|
patch = new_document(source, settings)
|
||||||
msgstr = translation.ugettext(msg)
|
msgstr = translation.ugettext(msg)
|
||||||
parser.parse(msgstr, patch)
|
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):
|
def process_dependencies(self, docname, doctree):
|
||||||
|
|||||||
Reference in New Issue
Block a user