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
|
* #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
|
* 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
|
* #2360: Fix numref in LaTeX output is broken
|
||||||
|
* #2361: Fix additional paragraphs inside the "compound" directive are indented
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
@ -1267,6 +1267,13 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
depart_field_body = depart_definition
|
depart_field_body = depart_definition
|
||||||
|
|
||||||
def visit_paragraph(self, node):
|
def visit_paragraph(self, node):
|
||||||
|
# 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')
|
self.body.append('\n')
|
||||||
|
|
||||||
def depart_paragraph(self, node):
|
def depart_paragraph(self, node):
|
||||||
|
Loading…
Reference in New Issue
Block a user