aboutsummaryrefslogtreecommitdiff
path: root/blog_v2/src/blog/pretty.py
blob: 2ae916a701ed716a6617227bdd3842cb0d6630a9 (plain)
1
2
3
4
5
from lxml import etree, html


def pretty_html(s):
    return etree.tostring(html.fromstring(s), pretty_print=True).decode("utf8")