Try assigning pre-line to the white-space element instead of pre-wrap. I tested it on the JSFiddle you shared, and it collapses the additional whitespace seen in the chrome implementation.