From: Guido Draheim Date: Sun, 25 Mar 2018 23:35:36 +0000 (+0200) Subject: print mails correctly in dbk2htm X-Git-Tag: v0.13.70~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=999ec2710305a696f94aecb6e0da953967233d96;p=zziplib print mails correctly in dbk2htm --- diff --git a/docs/dbk2man.py b/docs/dbk2man.py index 8a2879c..c5176b7 100755 --- a/docs/dbk2man.py +++ b/docs/dbk2man.py @@ -35,6 +35,10 @@ def htm(text): text = text.replace('>', '>') text = text.replace('"', '"') return text +def mailhref(text): + return re.sub("<([^<>]*@[^<>]*)>", + lambda x: '%s' % (x.group(1), x.group(1)), + text) OverviewEntry = collections.namedtuple("OverviewEntry", ["manpage", "manvolnum", "refpurpose"]) @@ -282,7 +286,7 @@ def refsect2htm(refsect, title = ""): if para.tag == 'itemizedlist': text += "" + "\n" continue @@ -323,7 +327,7 @@ def para2htm(para): item = item.replace("", "") item = item.replace("", "") item = item.replace("", "") - return item + return mailhref(item) def styleinfo2(man): if man: