This should be unnecessary, since `doc.getText()` guarantees to return LF line endings if no argument is passed.