From: Kefu Chai Date: Wed, 15 Aug 2018 05:28:53 +0000 (+0800) Subject: man: skip directive starting with ".." X-Git-Tag: v14.0.1~587^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ad93d71c8fc4f00ef1821b855de181738324445e;p=ceph.git 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 --- diff --git a/man/conf.py b/man/conf.py index c978825293cf1..6eb3faa84a03a 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')