From ec490bc6681545de1e95f805ce834e527b4bd14c Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 14 May 2024 18:52:50 -0400 Subject: [PATCH] fix: use minify-html instead of minify-html-onepass xref: https://github.com/wilsonzlin/minify-html/issues/188 --- deepmodeling_sphinx/inject.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deepmodeling_sphinx/inject.py b/deepmodeling_sphinx/inject.py index 680a3dd..e81cf0e 100644 --- a/deepmodeling_sphinx/inject.py +++ b/deepmodeling_sphinx/inject.py @@ -3,7 +3,7 @@ from pathlib import Path from typing import Any, Dict -import minify_html_onepass +import minify_html from cssmin import cssmin from jinja2 import Template from jsmin import jsmin @@ -121,7 +121,7 @@ def minify_html_files(app, pagename, templatename, context, doctree): def render(self, template, render_context): content = old_render(template, render_context) try: - return minify_html_onepass.minify( + return minify_html.minify( content, minify_js=True, minify_css=True ) except SyntaxError: diff --git a/pyproject.toml b/pyproject.toml index 63b50c2..d6a3094 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ ] dependencies = [ 'sphinx', - 'minify-html-onepass', + 'minify-html', 'jsmin', 'cssmin', 'jinja2',