From 0f391a1d9083771d2343cf05d2d4c1f2d05e14e0 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 16 Jun 2007 19:50:06 +0000 Subject: [PATCH] More diff test normalizing - Legacy-Id: 443 --- ietf/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ietf/tests.py b/ietf/tests.py index a15075c76..3327f5efe 100644 --- a/ietf/tests.py +++ b/ietf/tests.py @@ -28,13 +28,13 @@ def reduce(html, pre=False, fill=True): html = re.sub(r"(?i)(RFC) (\d+)", r"\1\2", html) # ignore "RFC 1234" vs. "RFC1234" diffs html = re.sub(r"\bID\b", r"I-D", html) # idnore " ID " vs. " I-D " diffs text = html2text(html, pre=pre, fill=fill).strip() - text = text.replace(" :", ": ") + text = text.replace(" : ", ": ").replace(" :", ": ") text = text.replace('."', '".') text = text.replace(',"', '",') if pre: text = text.split("\n") else: - text = [ line.strip() for line in text.split("\n") ] + text = [ line.strip() for line in text.split("\n") if line.strip()] return text def get_patterns(module):