md2man: fix compatibility problem with python-markdown 1.6.

Symptom: the following error message when building redo.1:

	ValueError: non-man-compatible html tag u'br'
This commit is contained in:
Avery Pennarun 2011-03-10 19:48:24 -08:00
commit 2260bdd30f

View file

@ -99,7 +99,7 @@ def _clean(s):
def _bitlist(tag): def _bitlist(tag):
if not getattr(tag, 'contents', None): if getattr(tag, 'contents', None) == None:
for i in _split_lines(str(tag)): for i in _split_lines(str(tag)):
yield None,_clean(i) yield None,_clean(i)
else: else:
@ -214,7 +214,7 @@ def do(tag):
macro('.fi') macro('.fi')
macro('.RE') macro('.RE')
w.end_para() w.end_para()
elif name == 'p': elif name == 'p' or name == 'br':
g = re.match(re.compile(r'([^\n]*)\n +: +(.*)', re.S), str(tag)) g = re.match(re.compile(r'([^\n]*)\n +: +(.*)', re.S), str(tag))
if g: if g:
# it's a definition list (which some versions of python-markdown # it's a definition list (which some versions of python-markdown