fix line endings for long texts in console mode