mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2361: additional paragraphs inside the "compound" directive are indented
This commit is contained in:
parent
131057599d
commit
569a5bedca
1
CHANGES
1
CHANGES
@ -30,6 +30,7 @@ Bugs fixed
|
||||
* #2331: Fix code-blocks are filled by block in dvi; remove ``xcdraw`` option from xcolor package
|
||||
* Fix the confval type checker emits warnings if unicode is given to confvals which expects string value
|
||||
* #2360: Fix numref in LaTeX output is broken
|
||||
* #2361: Fix additional paragraphs inside the "compound" directive are indented
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
@ -1267,7 +1267,14 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
depart_field_body = depart_definition
|
||||
|
||||
def visit_paragraph(self, node):
|
||||
self.body.append('\n')
|
||||
# insert blank line, if the paragraph follows a non-paragraph node in a compound
|
||||
index = node.parent.index(node)
|
||||
if (index > 0 and isinstance(node.parent, nodes.compound) and
|
||||
not isinstance(node.parent[index - 1], nodes.paragraph) and
|
||||
not isinstance(node.parent[index - 1], nodes.compound)):
|
||||
self.body.append('\\noindent\n')
|
||||
else:
|
||||
self.body.append('\n')
|
||||
|
||||
def depart_paragraph(self, node):
|
||||
self.body.append('\n')
|
||||
|
Loading…
Reference in New Issue
Block a user