@keep_lazy_text
def normalize_newlines(text):
 text = force_text(text)
 return re_newlines.sub('\n', text)

@ keep_lazy_text def normalize_newlines ( text ) : text = force_text ( text ) return re_newlines . sub ( '\n' , text )
normalizes crlf and cr newlines to just lf .