to_html: Do not add a space before > if the tag has no attributes
A space would have been added before >, but only if the tag had no
attributes. This commit makes the behavior more consistent by not adding a space
before > both when there are no attributes and when there are attributes.