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:
parent
3de31a1a4d
commit
2b26a345cd
1 changed files with 5 additions and 2 deletions
|
@ -61,8 +61,11 @@ func minifyContent(content string) string {
|
||||||
|
|
||||||
// Options required to avoid breaking the HTML content.
|
// Options required to avoid breaking the HTML content.
|
||||||
m.Add("text/html", &html.Minifier{
|
m.Add("text/html", &html.Minifier{
|
||||||
KeepEndTags: true,
|
KeepEndTags: true,
|
||||||
KeepQuotes: true,
|
KeepQuotes: true,
|
||||||
|
KeepComments: false,
|
||||||
|
KeepSpecialComments: false,
|
||||||
|
KeepDefaultAttrVals: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
if minifiedHTML, err := m.String("text/html", content); err == nil {
|
if minifiedHTML, err := m.String("text/html", content); err == nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue