Skip to content

Commit

Permalink
Merge pull request #2732 from st1020/feat/do-not-minify-js-when-minif…
Browse files Browse the repository at this point in the history
…y-html

* feat: do not minify js when minify html

* test: update tests
  • Loading branch information
Keats authored Dec 11, 2024
2 parents bc00064 + 4452794 commit a586d95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/site/src/minify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub fn html(html: String) -> Result<String> {
let mut cfg = Cfg::spec_compliant();
cfg.keep_html_and_head_opening_tags = true;
cfg.minify_css = true;
cfg.minify_js = true;
cfg.minify_js = false;

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

// https://github.com/getzola/zola/issues/1765
// https://github.com/getzola/zola/issues/2731
#[ignore]
#[test]
fn can_minify_js() {
let input = r#"
Expand Down

0 comments on commit a586d95

Please sign in to comment.