Handle line feeds and carriage returns