Handle different line break lengths correctly.