From 56c2fd6c5bd80e276d3f22e2c80c7593867ff028 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 1 Feb 2015 18:32:51 +0900 Subject: [PATCH] help2rst.py: Strip trailing ':' after section --- help2rst.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/help2rst.py b/help2rst.py index 13a4916d..891decf1 100755 --- a/help2rst.py +++ b/help2rst.py @@ -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 ''