Preserve formatting state across line breaks