Skip to content

Commit

Permalink
Quickly skip over minification of script/style tags with no conte…
Browse files Browse the repository at this point in the history
…nt (#186)
  • Loading branch information
RealOrangeOne authored Dec 13, 2024
1 parent 47c6710 commit 32aacb6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions minify-html/src/minify/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ pub fn minify_content(
),
NodeData::Instruction { code, ended } => minify_instruction(cfg, out, &code, ended),
NodeData::RcdataContent { typ, text } => minify_rcdata(cfg, out, typ, &text),
NodeData::ScriptOrStyleContent { code, lang: _ } if code.is_empty() => {},
NodeData::ScriptOrStyleContent { code, lang } => match lang {
ScriptOrStyleLang::CSS => minify_css(cfg, out, &code),
ScriptOrStyleLang::Data => out.extend_from_slice(&code),
Expand Down

0 comments on commit 32aacb6

Please sign in to comment.