From 999ec2710305a696f94aecb6e0da953967233d96 Mon Sep 17 00:00:00 2001 From: Guido Draheim Date: Mon, 26 Mar 2018 01:35:36 +0200 Subject: [PATCH] print mails correctly in dbk2htm --- docs/dbk2man.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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: -- 2.40.0