]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
man: skip directive starting with ".." 23580/head
authorKefu Chai <kchai@redhat.com>
Wed, 15 Aug 2018 05:28:53 +0000 (13:28 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 15 Aug 2018 05:28:54 +0000 (13:28 +0800)
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 <kchai@redhat.com>
man/conf.py

index c978825293cf180da562f40318218adaa8f2879c..6eb3faa84a03aed87b0f21c5808a53fad4b6ddde 100644 (file)
@@ -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')