(shr-insert): Rework the line-breaking algorithm.