corrections to whitespace edge cases in HTML output