From c462cf9c44b0245417ddd7b89f33edf7bbee4663 Mon Sep 17 00:00:00 2001 From: early Date: Sat, 7 Sep 2024 18:04:49 -0600 Subject: [PATCH] don't try to minify js --- htmltree/prettify.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htmltree/prettify.go b/htmltree/prettify.go index 7bd4865..33fbdd0 100644 --- a/htmltree/prettify.go +++ b/htmltree/prettify.go @@ -69,6 +69,9 @@ func Minify() func(root *html.Node) { if n.Type == html.ElementNode && n.Data == "pre" { return true, nil } + if n.Type == html.ElementNode && n.Data == "script" { + return true, nil + } if n.Type == html.TextNode { n.Data = unindentRegexp.ReplaceAllString(n.Data, "") n.Data = despaceRegexp.ReplaceAllString(n.Data, " ") -- 2.39.5