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
if line == 'Options:':
print 'OPTIONS:'
print '--------'
print 'OPTIONS'
print '-------'
print ''
continue
@ -137,7 +137,7 @@ DESCRIPTION
if not line.startswith(' ') and line.endswith(':'):
# subsection
subsec = line.strip()
subsec = line.strip()[:-1]
print '{}'.format(subsec)
print '{}'.format('~' * len(subsec))
print ''