fix line breaking to avoid misprocessing of markup