Beautiful soup smears out HTML so that every element starts a new line.
All the HTML minifiers I have found compress everything to a single line.
Is there, somewhere (and preferably in Python) a tool that will output normal HTML. That is: block elements would get a new line, but inline elements would not?
BS output
<h2>
headline
</h2>
<p>
Blah blah
<b>
bold text
</b>
same paragraph blah
<a href="">
a link in the text
</a>
</p>
<p>
Another paragraph
</p>
minified
<h2>headline</h2><p> Blah blah <b> bold text </b> same paragraph blah <a href=""> a link in the text </a></p><p> Another paragraph</p>
what i want
<h2>headline</h2>
<p> Blah blah <b> bold text </b> same paragraph blah <a href=""> a link in the text </a></p>
<p> Another paragraph</p>