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:
Martin Liska
2021-06-30 12:40:12 +02:00
parent 805fd98e00
commit 1227799abf
2 changed files with 17 additions and 3 deletions

View File

@@ -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