Skip to content

Commit a586d95

Browse files
authored
Merge pull request #2732 from st1020/feat/do-not-minify-js-when-minify-html
* feat: do not minify js when minify html * test: update tests
2 parents bc00064 + 4452794 commit a586d95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/site/src/minify.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub fn html(html: String) -> Result<String> {
55
let mut cfg = Cfg::spec_compliant();
66
cfg.keep_html_and_head_opening_tags = true;
77
cfg.minify_css = true;
8-
cfg.minify_js = true;
8+
cfg.minify_js = false;
99

1010
let minified = minify(html.as_bytes(), &cfg);
1111
match std::str::from_utf8(&minified) {
@@ -114,6 +114,8 @@ mod tests {
114114
}
115115

116116
// https://github.com/getzola/zola/issues/1765
117+
// https://github.com/getzola/zola/issues/2731
118+
#[ignore]
117119
#[test]
118120
fn can_minify_js() {
119121
let input = r#"

0 commit comments

Comments
 (0)