Remove comments

This commit is contained in:
Adrian Vollmer 2022-09-25 10:39:19 +02:00
parent 9d133292a3
commit f4c4e7a31f

View File

@ -124,8 +124,6 @@ def embed_html_resources(html, base_dir, js):
"""Embed fonts in preload links to avoid jumps when loading"""
# This cannot be done in JavaScript, it would be too late
# TODO set body.display = None?
import bs4
soup = bs4.BeautifulSoup(html, 'lxml')
@ -149,7 +147,6 @@ def to_data_uri(filename, mime_type=None):
def embed_css_resources(css, filename):
"""Replace url(<path>) with url(data:<mime_type>;base64, ...)"""
# TODO handle @import
# This uses some heuristics which could technically fail
import re