Skip to content

Commit 2c6c881

Browse files
committed
Ignore 'RFC 1234' vs. 'RFC1234' diffs. Ignore 'ID' vs. 'I-D' diffs.
- Legacy-Id: 442
1 parent ca958b9 commit 2c6c881

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/tests.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ def run_tests(module_list, verbosity=1, extra_tests=[]):
2323
return django.test.simple.run_tests(module_list, verbosity, extra_tests)
2424

2525
def reduce(html, pre=False, fill=True):
26-
html = re.sub(" :", ":", html)
2726
if html.count("<li>") > 5*html.count("</li>"):
2827
html = html.replace("<li>", "</li><li>")
29-
text = html2text(html, pre=pre, fill=fill)
28+
html = re.sub(r"(?i)(RFC) (\d+)", r"\1\2", html) # ignore "RFC 1234" vs. "RFC1234" diffs
29+
html = re.sub(r"\bID\b", r"I-D", html) # idnore " ID " vs. " I-D " diffs
30+
text = html2text(html, pre=pre, fill=fill).strip()
31+
text = text.replace(" :", ": ")
3032
text = text.replace('."', '".')
3133
text = text.replace(',"', '",')
3234
if pre:

0 commit comments

Comments
 (0)