changeset 15530 | eeac5e179243 |
parent 15529 | b35cf47286a6 |
child 15657 | d976b1ef6760 |
--- a/mercurial/mdiff.py Fri Nov 18 14:16:47 2011 +0100 +++ b/mercurial/mdiff.py Fri Nov 18 14:23:03 2011 +0100 @@ -67,10 +67,9 @@ def wsclean(opts, text, blank=True): if opts.ignorews: - text = re.sub('[ \t\r]+', '', text) + text = bdiff.fixws(text, 1) elif opts.ignorewsamount: - text = re.sub('[ \t\r]+', ' ', text) - text = text.replace(' \n', '\n') + text = bdiff.fixws(text, 0) if blank and opts.ignoreblanklines: text = re.sub('\n+', '\n', text).strip('\n') return text