Minor tweaks for man page parser.

darcs-hash:20071028233110-75c98-7d900290fdb313cb8ce2194a2d452cd9d4c8dc13.gz
This commit is contained in:
liljencrantz 2007-10-29 09:31:10 +10:00
parent 54b1986986
commit 374fc09af0

View file

@ -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