wilsonzlin / minify-html

Extremely fast and smart HTML + JS + CSS minifier, available for Rust, Deno, Java, Node.js, Python, Ruby, and WASM
MIT License
842 stars 36 forks source link

FR: Limit Line Length (For email) #200

Open stellarpower opened 1 month ago

stellarpower commented 1 month ago

Hi,

I'd like to minify some HTML that will be included in an email message.

Because of this, the line length the server will accept is limited according to RFC 2822. It seems by default the output is across one line (makes total sense).

It'd be really useful to have a tool with the understanding of minification and what can break formatting, what is equivalent, etc. - but also that can then split the HTML into a given line length limit without then risking adding whitespace that will be rendered. I fear trying to achieve this in two parts using separate tools will risk losing the value added by the other.

Is a limit on the length of lines that htmlmin will output something that could be added?

Thanks.