Intelligently pretty-print HTML/XML with inline tags.
Project description
prettierfier
While I love Beautiful Soup, the BeautifulSoup.prettify() function adds a linebreak between every tag.
This results in unwanted white space between tags that should be inline, like <sup>
, <a>
, <span>
, etc:
<p>Introducing GitHub<sup>®</sup></p>
Introducing GitHub®
vs.
<p>
Introducing GitHub
<sup>
®
</sup>
</p>
Introducing GitHub ®
This script parses HTML/XML as a raw string to more intelligently format tags.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prettierfier-1.0.0.tar.gz
(1.3 kB
view hashes)
Built Distribution
Close
Hashes for prettierfier-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55dd324265760c6eec5a9ce03a108a0b781dc8926b9504c39065dfaf8d85f75e |
|
MD5 | 4a61626d0da90a976b9181d1ef4d949f |
|
BLAKE2b-256 | 42d8bece32847c67ea0f562cc5ea017ec73848f445c788810b86ccc2b91d563c |