aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/resource_chain_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-07-19 11:32:47 +0200
committerBjørn Erik Pedersen <[email protected]>2021-07-19 23:35:20 +0200
commitc19f65f956739ab76c38222d48a3e461525e31af (patch)
tree7587764e36609cf423eebd6a7bb1449bfffde980 /hugolib/resource_chain_test.go
parent022c4795510306e08a4aba31504ca382d41c7fac (diff)
downloadhugo-c19f65f956739ab76c38222d48a3e461525e31af.tar.gz
hugo-c19f65f956739ab76c38222d48a3e461525e31af.zip
minifiers: Make keepWhitespace = true default for HTML
Fixes #8771
Diffstat (limited to 'hugolib/resource_chain_test.go')
-rw-r--r--hugolib/resource_chain_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go
index a367237ab..834fe4357 100644
--- a/hugolib/resource_chain_test.go
+++ b/hugolib/resource_chain_test.go
@@ -456,6 +456,10 @@ func TestResourceChainPostProcess(t *testing.T) {
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
b := newTestSitesBuilder(t)
+ b.WithConfigFile("toml", `[minify]
+ [minify.tdewolff]
+ [minify.tdewolff.html]
+ keepWhitespace = false`)
b.WithContent("page1.md", "---\ntitle: Page1\n---")
b.WithContent("page2.md", "---\ntitle: Page2\n---")
@@ -562,6 +566,11 @@ T6: {{ $bundle1.Permalink }}
}},
{"minify", func() bool { return true }, func(b *sitesBuilder) {
+ b.WithConfigFile("toml", `[minify]
+ [minify.tdewolff]
+ [minify.tdewolff.html]
+ keepWhitespace = false
+`)
b.WithTemplates("home.html", `
Min CSS: {{ ( resources.Get "css/styles1.css" | minify ).Content }}
Min JS: {{ ( resources.Get "js/script1.js" | resources.Minify ).Content | safeJS }}