mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #4206: latex: reST label between paragraphs loses paragraph break
This commit is contained in:
parent
e03ec5b9fb
commit
29c62c64f5
2
CHANGES
2
CHANGES
@ -20,6 +20,8 @@ Features added
|
|||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* #4206: latex: reST label between paragraphs loses paragraph break
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -1919,6 +1919,12 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
# will be generated differently
|
# will be generated differently
|
||||||
if id.startswith('index-'):
|
if id.startswith('index-'):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# insert blank line, if the target follows a paragraph node
|
||||||
|
index = node.parent.index(node)
|
||||||
|
if index > 0 and isinstance(node.parent[index - 1], nodes.paragraph):
|
||||||
|
self.body.append('\n')
|
||||||
|
|
||||||
# do not generate \phantomsection in \section{}
|
# do not generate \phantomsection in \section{}
|
||||||
anchor = not self.in_title
|
anchor = not self.in_title
|
||||||
self.body.append(self.hypertarget(id, anchor=anchor))
|
self.body.append(self.hypertarget(id, anchor=anchor))
|
||||||
|
Loading…
Reference in New Issue
Block a user