Sometimes you may want to leave an explanatory note mid-paragraph that is hidden to the reader but visible to anybody editing the file to explain something that isn't obvious e.g. after `tsc --module node16` you may want to add <!-- we intentionally use --module instead of --moduleResolution because with TypeScript < 5.2 --moduleResolution node16 is quite a footgun -->. This would be too much detail for the reader but important for anybody editing the file. Unfortunately deno fmt doesn't handle HTML comments mid-paragraph well:
Sometimes deno fmt breaks up the paragraph:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. <!-- Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -->
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
becomes:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
<!-- Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -->
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
Sometimes deno fmt forces a weird line break:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex <!-- ea commodo
aute --> irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est laborum.
becomes:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex <!-- ea commodo
aute -->
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est laborum.
Sometimes you may want to leave an explanatory note mid-paragraph that is hidden to the reader but visible to anybody editing the file to explain something that isn't obvious e.g. after
`tsc --module node16`
you may want to add<!-- we intentionally use --module instead of --moduleResolution because with TypeScript < 5.2 --moduleResolution node16 is quite a footgun -->
. This would be too much detail for the reader but important for anybody editing the file. Unfortunatelydeno fmt
doesn't handle HTML comments mid-paragraph well:Sometimes
deno fmt
breaks up the paragraph:becomes:
Sometimes
deno fmt
forces a weird line break:becomes: