Merge pull request #5065 from tk0miya/5064_latex_KeyError

Fix #5064: KeyError on literal_block in new Latex transform
This commit is contained in:
Takeshi KOMIYA 2018-06-12 01:34:01 +09:00 committed by GitHub
commit 1c3eadcf61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -578,7 +578,7 @@ class LiteralBlockTransform(SphinxTransform):
return
for node in self.document.traverse(nodes.container):
if node['literal_block'] is True:
if node.get('literal_block') is True:
newnode = captioned_literal_block('', *node.children, **node.attributes)
node.replace_self(newnode)