Skip to content

Newlines are not preserved #2

@dmfrancisco

Description

@dmfrancisco

First of all, thank you for creating this package 👍

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>"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions