Not sure I see the benefit of this. It's only called from one place yet has the ability to add tabs in the wrong location if a string already contained a newline somewhere else?