help2rst.py: Strip trailing ':' after section

This commit is contained in:
Tatsuhiro Tsujikawa 2015-02-01 18:32:51 +09:00
parent 267f877255
commit 56c2fd6c5b
1 changed files with 3 additions and 3 deletions

View File

@ -96,8 +96,8 @@ DESCRIPTION
in_arg = False in_arg = False
if line == 'Options:': if line == 'Options:':
print 'OPTIONS:' print 'OPTIONS'
print '--------' print '-------'
print '' print ''
continue continue
@ -137,7 +137,7 @@ DESCRIPTION
if not line.startswith(' ') and line.endswith(':'): if not line.startswith(' ') and line.endswith(':'):
# subsection # subsection
subsec = line.strip() subsec = line.strip()[:-1]
print '{}'.format(subsec) print '{}'.format(subsec)
print '{}'.format('~' * len(subsec)) print '{}'.format('~' * len(subsec))
print '' print ''