[PATCH] docs: manpages: Strip table of contents from manpages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After meson conversion the man pages started to contain the table of
contents.

In autoconf we prevented this by a 'grep -v ::contents' in the command
building the manpages.

A more cultured solution is to strip out the 'contents' docutils element
directly.

Reported-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 docs/manpages/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index 3888bb8efe..7ed1d304a4 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -89,7 +89,8 @@ foreach data : docs_man_files
       man_file,
       input: rst_file,
       output: man_file,
-      command: [ rst2man_prog, '--strict', '@INPUT@', '@OUTPUT@' ],
+      # 'contents' element is the table of contents which is undesired in manpage
+      command: [ rst2man_prog, '--strip-elements-with-class', 'contents', '--strict', '@INPUT@', '@OUTPUT@' ],
       install: true,
       install_dir: mandir / 'man@0@'.format(data['section']),
     )
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux