Normalizes every line ending to LF.
String normalizeToLF(String text) { return text.replaceAll(RegExp(r'\r\n?'), '\n'); }