mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
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 <kchai@redhat.com>
This commit is contained in:
parent
4cf9e35cf5
commit
ad93d71c8f
@ -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')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user