Skip to content

Commit

Permalink
keep document tags in minify
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarchie committed Oct 28, 2023
1 parent 54bc8fa commit 5ee40f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion render.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,11 @@ func writeHTMLFiles(filenames []string, contents string) error {
}

writer := &strings.Builder{}
minifier := &mHTML.Minifier{
KeepDocumentTags: true,
}

err = mHTML.Minify(&minify.M{}, writer, strings.NewReader(contents), nil)
err = minifier.Minify(&minify.M{}, writer, strings.NewReader(contents), nil)
if err != nil {
return fmt.Errorf("could not minify: %w", err)
}
Expand Down

0 comments on commit 5ee40f8

Please sign in to comment.