From 2c6c881a3daf27a25e641018c4a81a45803e00d6 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 16 Jun 2007 18:29:36 +0000 Subject: [PATCH] Ignore 'RFC 1234' vs. 'RFC1234' diffs. Ignore 'ID' vs. 'I-D' diffs. - Legacy-Id: 442 --- ietf/tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ietf/tests.py b/ietf/tests.py index ef3b84720..a15075c76 100644 --- a/ietf/tests.py +++ b/ietf/tests.py @@ -23,10 +23,12 @@ def run_tests(module_list, verbosity=1, extra_tests=[]): return django.test.simple.run_tests(module_list, verbosity, extra_tests) def reduce(html, pre=False, fill=True): - html = re.sub(" :", ":", html) if html.count("
  • ") > 5*html.count("
  • "): html = html.replace("
  • ", "
  • ") - text = html2text(html, pre=pre, fill=fill) + 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('."', '".') text = text.replace(',"', '",') if pre: