mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4208 from tk0miya/4206_label_loses_paragraph_break
Fix #4206: latex: reST label between paragraphs loses paragraph break
This commit is contained in:
commit
26db2675b4
2
CHANGES
2
CHANGES
@ -20,6 +20,8 @@ Features added
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #4206: latex: reST label between paragraphs loses paragraph break
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
|
@ -1919,6 +1919,12 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
# will be generated differently
|
||||
if id.startswith('index-'):
|
||||
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{}
|
||||
anchor = not self.in_title
|
||||
self.body.append(self.hypertarget(id, anchor=anchor))
|
||||
|
Loading…
Reference in New Issue
Block a user