fix html minification
authorAlex Chan <alex@alexwlchan.net>
Wed, 16 Dec 2020 20:25:52 +0000 (20:25 +0000)
committerAlex Chan <alex@alexwlchan.net>
Wed, 16 Dec 2020 20:25:52 +0000 (20:25 +0000)
scripts/render_html.py

index 1cbd41b..92c76e2 100755 (executable)
@@ -169,9 +169,8 @@ def save_html(template, out_name="", **kwargs):
     html = template.render(**kwargs)
     out_path = pathlib.Path("_html") / out_name / "index.html"
     out_path.parent.mkdir(exist_ok=True, parents=True)
-    html_str = htmlmin.minify(html)
 
-    soup = bs4.BeautifulSoup(html_str, "html.parser")
+    soup = bs4.BeautifulSoup(html, "html.parser")
 
     # Minify the CSS in all inline <style> tags.
     for style_tag in soup.find_all("style"):