minimal styling
This commit is contained in:
parent
177152d03a
commit
63f6fc9e7d
7
build.py
7
build.py
|
|
@ -37,10 +37,9 @@ def minify(html):
|
|||
code.string = new
|
||||
tab = True
|
||||
code.unwrap()
|
||||
if tab:
|
||||
tab = soup.new_tag('style')
|
||||
tab.string = '*{tab-size:4}'
|
||||
soup.insert(1, tab)
|
||||
sty = soup.new_tag('style')
|
||||
sty.string = '*{tab-size:4;max-width:1000px}' if tab else '*{max-width:1000px}'
|
||||
soup.insert(1, sty)
|
||||
for tag in soup.find_all(True):
|
||||
tag.attrs = {k: v for k, v in tag.attrs.items() if k != 'class'}
|
||||
return minify_html.minify(str(soup))
|
||||
|
|
|
|||
Loading…
Reference in a new issue