I’m using js-beautify
to beautify my HTML like this:
import { html_beautify } from 'js-beautify';
// later in the component
html_beautify(localHtmlContent, {indent_size: 2});
which makes my html go from this:
<!Doctype html>
<html>
<body>
<div>
<h1>Title</h1>
<p>Paragraph</p>
</div>
</body>
</html>
to this:
<!Doctype html>
<html>
<body>
<div>
<h1>Title</h1>
<p>Paragraph</p>
</div>
</body>
</html>
and I don’t want the newlines between <html>
and before </html>
…
How do I achieve this?
I tried removing the newlines myself, but I think there “must” be a way to remove this with some parameter…