Skip to content

Commit 0f391a1

Browse files
committed
More diff test normalizing
- Legacy-Id: 443
1 parent 2c6c881 commit 0f391a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ def reduce(html, pre=False, fill=True):
2828
html = re.sub(r"(?i)(RFC) (\d+)", r"\1\2", html) # ignore "RFC 1234" vs. "RFC1234" diffs
2929
html = re.sub(r"\bID\b", r"I-D", html) # idnore " ID " vs. " I-D " diffs
3030
text = html2text(html, pre=pre, fill=fill).strip()
31-
text = text.replace(" :", ": ")
31+
text = text.replace(" : ", ": ").replace(" :", ": ")
3232
text = text.replace('."', '".')
3333
text = text.replace(',"', '",')
3434
if pre:
3535
text = text.split("\n")
3636
else:
37-
text = [ line.strip() for line in text.split("\n") ]
37+
text = [ line.strip() for line in text.split("\n") if line.strip()]
3838
return text
3939

4040
def get_patterns(module):

0 commit comments

Comments
 (0)