Preserve formatting state across multiple line breaks