--- id: prettierfier version: "1.0.3" license: MIT license_treatment: permissive maintenance: abandoned --- # prettierfier — Intelligently pretty-print HTML/XML with inline tags. License: permissive · Maintenance: abandoned · Downloads: 615.0K/mo ## What it is and what it does Prettierfier is a lightweight HTML and XML formatter that solves a specific problem: BeautifulSoup's prettify() method adds line breaks between every tag, which breaks inline elements like ``, ``, and ``. This package uses regex-based parsing to reformat markup more intelligently, preserving inline tags on the same line while still indenting block-level structure. The package contains no external dependencies—it uses only the Python Standard Library—and offers two main functions: prettify_xml() for raw XML with configurable indentation, and prettify_html() designed to post-process BeautifulSoup output. It's a single-purpose tool for developers who need cleaner, more readable HTML/XML output without the whitespace bloat. Use it for: - Post-process BeautifulSoup.prettify() output to remove unwanted line breaks between inline HTML tags. - Format raw XML strings with intelligent indentation before writing to files or logs. - Clean up HTML templates or scraped markup for human readability without breaking inline element layout. - Debug HTML/XML structure by viewing it in a more compact, readable form than standard prettifiers produce. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reformats HTML and XML strings with intelligent inline-tag handling, avoiding the excessive line breaks that tools like BeautifulSoup.prettify() introduce between tags that should stay on the same line. No. The project is abandoned with its last release on 2019-07-22 and no maintenance since. While the code is simple and dependency-free, there is no path to bug fixes or compatibility updates. For active alternatives, consider using BeautifulSoup with a custom formatter or modern HTML/XML libraries with maintained prettification support. ## Install pip install prettierfier uv add prettierfier poetry add prettierfier ## Installing prettierfier Before you install: Installation is frictionless—the package has no external dependencies and installs as a pure Python wheel. However, the project has been abandoned since its last release on 2019-07-22 with no updates since, so expect no maintenance or bug fixes going forward. License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions. Quickstart: pip install prettierfier import prettierfier ugly_html = """Introducing GitHub®""" pretty = prettierfier.prettify_html(ugly_html) print(pretty) Verify before relying: - Whether the regex-based parsing handles all HTML5/XML edge cases or only a subset of real-world markup. - Performance characteristics on large documents or whether there are known scalability limits. - Compatibility with Python versions beyond 3.7 (the latest classifier listed), given the maintenance gap. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 615.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags html xml formatting, prettify html without extra whitespace, intelligent html indentation, remove unwanted linebreaks html, format html inline tags, xml pretty print, beautifulsoup prettify alternative, html-formatting, xml-prettify, abandoned [View on SkillFed](https://skillfed.io/packages/prettierfier) · [View on PyPI](https://pypi.org/project/prettierfier/)