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 # Regexes for performing cleanup
cl = {re.compile(r"[ \n\t\r]+", re.MULTILINE):" ", 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]"):"",
re.compile(r"[ \n\t\r]$"):"", re.compile(r"[ \n\t\r]$"):"" }
re.compile(r"-[ \t]*\n[ \t\r]+" ):""}
def header(cmd): def header(cmd):
print '''# print '''#
@ -151,5 +151,8 @@ for c in man:
else: else:
desc += c desc += c
else:
print "Unknown mode", mode
pc = c pc = c