mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refactor: texinfo: Remove CR char from output
The CR character was added for readability of output. But it makes the texinfo writer a bit complicated. This removes it from output to keep our code simple (reducing conditions).
This commit is contained in:
parent
5563f672ec
commit
8e23b03263
@ -765,12 +765,10 @@ class TexinfoTranslator(SphinxTranslator):
|
||||
# -- Blocks
|
||||
|
||||
def visit_paragraph(self, node: Element) -> None:
|
||||
if not self.in_footnote:
|
||||
self.body.append('\n')
|
||||
self.body.append('\n')
|
||||
|
||||
def depart_paragraph(self, node: Element) -> None:
|
||||
if not self.in_footnote:
|
||||
self.body.append('\n')
|
||||
self.body.append('\n')
|
||||
|
||||
def visit_block_quote(self, node: Element) -> None:
|
||||
self.body.append('\n@quotation\n')
|
||||
|
@ -119,7 +119,7 @@ def test_texinfo_footnote(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
output = (app.outdir / 'python.texi').read_text()
|
||||
assert 'First footnote: @footnote{First}' in output
|
||||
assert 'First footnote: @footnote{\nFirst\n}' in output
|
||||
|
||||
|
||||
@pytest.mark.sphinx('texinfo')
|
||||
|
Loading…
Reference in New Issue
Block a user