From 374fc09af0af8623c4a6cd2f4c007a4a6d47a474 Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Mon, 29 Oct 2007 09:31:10 +1000 Subject: [PATCH] Minor tweaks for man page parser. darcs-hash:20071028233110-75c98-7d900290fdb313cb8ce2194a2d452cd9d4c8dc13.gz --- make_completions.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/make_completions.py b/make_completions.py index 5830bfeae..215999cd0 100755 --- a/make_completions.py +++ b/make_completions.py @@ -6,10 +6,10 @@ import re # Regexes for performing cleanup -cl = {re.compile(r"[ \n\t\r]+", re.MULTILINE):" ", - re.compile(r"^[ \n\t\r]"):"", - re.compile(r"[ \n\t\r]$"):"", - re.compile(r"-[ \t]*\n[ \t\r]+" ):""} +cl = { re.compile(r"-[ \t]*\n[ \t\r]+" ):"", + re.compile(r"[ \n\t\r]+", re.MULTILINE):" ", + re.compile(r"^[ \n\t\r]"):"", + re.compile(r"[ \n\t\r]$"):"" } def header(cmd): print '''# @@ -150,6 +150,9 @@ for c in man: else: desc += c + + else: + print "Unknown mode", mode pc = c