diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-05-04 02:30:16 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-05-07 22:25:42 +0900 |
commit | 5c56c99dfd95b9e0b9a96265ddda8efa5e69a339 (patch) | |
tree | f25e5c7a19e16f6eeb9965809f05c248978c893f /sphinx/util/nodes.py | |
parent | 2d42753acd16a2a733d951b46605238d44d3c692 (diff) | |
download | sphinx-git-5c56c99dfd95b9e0b9a96265ddda8efa5e69a339.tar.gz |
Fix #4913: i18n: literal blocks in bullet list are not translated
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r-- | sphinx/util/nodes.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index f439c515e..0285e4241 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -53,6 +53,10 @@ def apply_source_workaround(node): node.rawsource = re.sub(r'\s*:\s*%s' % re.escape(classifier.astext()), '', node.rawsource) + # workaround: literal_block under bullet list (#4913) + if isinstance(node, nodes.literal_block) and node.source is None: + node.source = find_source_node(node) + # workaround: recommonmark-0.2.0 doesn't set rawsource attribute if not node.rawsource: node.rawsource = node.astext() |