trimHtml
trimHtml copied to clipboard
Newlines are not preserved
First of all, thank you for creating this package :+1:
The current implementation removes newlines from the output, which can produce an incorrect result. Is this the intended behavior? Here's a simple example where whitespace is important:
trimHtml(`
<pre>
foo
bar
</pre>
`);
// Output will be: "<pre> foo bar</pre>"
// Instead of: "<pre>\n foo\n bar\n</pre>"
Thanks for pointing that out. In some way it's intended behavior in order to produce cleaner output, will fix it.