1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

perf(processor): minify content even further

There is no need to keep comments (conditionals or not, as IE isn't a thing
anymore), nor default attribute values.
This commit is contained in:
Julien Voisin 2025-06-29 21:55:34 +02:00 committed by GitHub
parent 3de31a1a4d
commit 2b26a345cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,8 +61,11 @@ func minifyContent(content string) string {
// Options required to avoid breaking the HTML content.
m.Add("text/html", &html.Minifier{
KeepEndTags: true,
KeepQuotes: true,
KeepEndTags: true,
KeepQuotes: true,
KeepComments: false,
KeepSpecialComments: false,
KeepDefaultAttrVals: false,
})
if minifiedHTML, err := m.String("text/html", content); err == nil {