Skip to content

Commit 6400131

Browse files
fix: use minify-html instead of minify-html-onepass (#57)
* fix: use minify-html instead of minify-html-onepass xref: wilsonzlin/minify-html#188 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e68e33b commit 6400131

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

deepmodeling_sphinx/inject.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pathlib import Path
44
from typing import Any, Dict
55

6-
import minify_html_onepass
6+
import minify_html
77
from cssmin import cssmin
88
from jinja2 import Template
99
from jsmin import jsmin
@@ -121,9 +121,7 @@ def minify_html_files(app, pagename, templatename, context, doctree):
121121
def render(self, template, render_context):
122122
content = old_render(template, render_context)
123123
try:
124-
return minify_html_onepass.minify(
125-
content, minify_js=True, minify_css=True
126-
)
124+
return minify_html.minify(content, minify_js=True, minify_css=True)
127125
except SyntaxError:
128126
return content
129127

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ classifiers = [
1616
]
1717
dependencies = [
1818
'sphinx',
19-
'minify-html-onepass',
19+
'minify-html',
2020
'jsmin',
2121
'cssmin',
2222
'jinja2',

0 commit comments

Comments
 (0)