Commit 678634eb authored by Andrea Bolognani's avatar Andrea Bolognani
Browse files

meson: Ask rst2html to strip comments



They can be problematic: in particular, the rst files generated
by keycodemapdb's keymap-gen contain things like

  To re-generate, run:
    keymap-gen --lang=rst --title=virkeycode-osx [...]

which result in xsltproc later choking with

  [1/12] Generating virkeyname-osx.html with a meson_exe.py custom command
  FAILED: docs/manpages/virkeyname-osx.html
  /usr/bin/meson --internal exe --capture docs/manpages/virkeyname-osx.html \
    /usr/bin/xsltproc [...] --nonet ../docs/subsite.xsl docs/manpages/virkeyname-osx.html.in
  docs/manpages/virkeyname-osx.html.in:17: parser error : Double hyphen within comment:
    keymap-gen --lang=rst --title=virkeyname-osx [...]
               ^

Stripping comments avoids the issue entirely.
Signed-off-by: Andrea Bolognani's avatarAndrea Bolognani <abologna@redhat.com>
parent 86e8f371
Pipeline #314804231 passed with stages
in 27 minutes and 13 seconds
......@@ -118,7 +118,7 @@ foreach data : docs_man_files
html_in_file,
input: rst_file,
output: html_in_file,
command: [ rst2html_prog, '--stylesheet=', '--strict', '@INPUT@' ],
command: [ rst2html_prog, '--strip-comments', '--stylesheet=', '--strict', '@INPUT@' ],
capture: true,
)
......
......@@ -185,7 +185,7 @@ docs_admin_api_xml = docs_api_generated[3]
docs_rst2html_gen = generator(
rst2html_prog,
output: '@BASENAME@.html.in',
arguments: [ '--stylesheet=', '--strict', '@INPUT@' ],
arguments: [ '--strip-comments', '--stylesheet=', '--strict', '@INPUT@' ],
capture: true,
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment