deno fmt: support html/svg/xml
deno fmt already formats JSX & TSX. Would it be too much extra work to also support formatting HTML, SVG, and other XML files (e.g. XML itself, XHTML, etc.)?
Today I keep reaching for Prettier on these occasions but I'd rather rely Deno for more core formatting needs. This support could likely be reused with tagged templates (https://github.com/denoland/deno/issues/19840).
I would be in favor of that, but it's a question for @dsherret if there's any appetite for supporting these natively in dprint.
Formatting .html files is now supported. I believe support for formatting .svg files is just a matter of recognizing these files, while .xml might be harder to do.
update: a new version of dprint isn't published yet but changes are in to format XML
https://github.com/dprint/dprint/pull/995
@dsherret am I correct in assuming that we will need to update https://github.com/denoland/deno_media_type to understand xml and svg files?
No. We can just base it on the extension.