help2rst.py: Strip trailing ':' after section
This commit is contained in:
parent
267f877255
commit
56c2fd6c5b
|
@ -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 ''
|
||||||
|
|
Loading…
Reference in New Issue