Fix bug to support application/xhtml+xml

I tracked down this bug as part of debugging this issue: https://github.com/ankit/stylebot/issues/156

xhtml requires that all tags are properly closed