From ad93d71c8fc4f00ef1821b855de181738324445e Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 15 Aug 2018 13:28:53 +0800 Subject: [PATCH] man: skip directive starting with ".." the target definition of hyper link looks like: .. _a-reference-label: there is chance that we need to add `:ref:` referencing man pages, and add target definition at the beginning of the manapges for the references. in that case, we need to skip the ref directives when looking for the title of the manpage. Signed-off-by: Kefu Chai --- man/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/conf.py b/man/conf.py index c978825293c..6eb3faa84a0 100644 --- a/man/conf.py +++ b/man/conf.py @@ -17,6 +17,8 @@ def _get_description(fname, base): continue if line.startswith(':') and line.endswith(':'): continue + if line.startswith('.. '): + continue one = line break two = f.readline().rstrip('\n') -- 2.39.5