mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
texinfo: fix emission of @footnote directives.
Right now, labels are emitted as part of a @footnote directive.
That results in e.g.
Note1: (@footnote{@w{(1)}
Future versions of GCC may zero-extend...
})
which is incorrect and should be rather:
Note1: (@footnote{Future versions of GCC may zero-extend...})
This commit is contained in:
@@ -112,3 +112,11 @@ def test_texinfo_escape_id(app, status, warning):
|
||||
assert translator.escape_id('Hello(world)') == 'Hello world'
|
||||
assert translator.escape_id('Hello world.') == 'Hello world'
|
||||
assert translator.escape_id('.') == '.'
|
||||
|
||||
|
||||
@pytest.mark.sphinx('texinfo', testroot='footnotes')
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user