html: support collapsing whitespace for non-pre elements