diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py --- a/mercurial/mdiff.py +++ b/mercurial/mdiff.py @@ -97,7 +97,7 @@ if blank and opts.ignoreblanklines: text = re.sub('\n+', '\n', text).strip('\n') if opts.ignorewseol: - text = re.sub(br'[ \t\r\f]+\n', r'\n', text) + text = re.sub(br'[ \t\r\f]+\n', br'\n', text) return text def splitblock(base1, lines1, base2, lines2, opts):