keepLineBreaks function added to keep text format