deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

suggestion: `@std/html/minify`

Open iuioiua opened this issue 3 months ago • 2 comments

The function would simply minify HTML.

function minify(html: string): string {
  // ...
}

iuioiua avatar Sep 10 '25 23:09 iuioiua

Would that be simple as removing new lines and comments?

WasixXD avatar Sep 11 '25 13:09 WasixXD

I don't think such a function would be very useful. In HTML, comments and most whitespace are significant (they affect the resulting DOM tree) and cannot be removed, so there is not much to be gained from minification.

0f-0b avatar Sep 11 '25 17:09 0f-0b