Skip to content

Commit

Permalink
bump html minifier and keep closing tags in minified html
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Feb 24, 2023
1 parent 0e99c0e commit 2f86452
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ serde_yaml = "0.9.17"
swc = "0.245.5"
swc_common = "0.29.28"
anyhow = "1.0.68"
minify-html = "0.10.7"
minify-html = "0.10.8"
lightningcss = "1.0.0-alpha.39"
ico = "0.3.0"
5 changes: 4 additions & 1 deletion src/html/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ use swc_common::{SourceMap, GLOBALS, FileName};
pub fn minify_html(input: String) -> Result<String, String> {
String::from_utf8(minify_html::minify(
input.as_bytes(),
&minify_html::Cfg::default()
&minify_html::Cfg {
keep_closing_tags: true,
..Default::default()
}
)).map_err(|e| format!("{e}"))
}

Expand Down

0 comments on commit 2f86452

Please sign in to comment.