aboutsummaryrefslogtreecommitdiffhomepage
path: root/minifiers
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2022-03-08 22:48:18 -0800
committerGitHub <[email protected]>2022-03-09 07:48:18 +0100
commitc97fed08f90b3758c85d3f67f038cd1f794d16fc (patch)
treeaa811701f719402af18b31d46ccdd32d2ba1ed87 /minifiers
parent53a6210d82eaa2cff7c802df88ff08dac5e7dced (diff)
downloadhugo-c97fed08f90b3758c85d3f67f038cd1f794d16fc.tar.gz
hugo-c97fed08f90b3758c85d3f67f038cd1f794d16fc.zip
minifiers: Make keepWhitespace = false default for HTML (note)
Closes #9456
Diffstat (limited to 'minifiers')
-rw-r--r--minifiers/config.go2
-rw-r--r--minifiers/minifiers_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/minifiers/config.go b/minifiers/config.go
index e56617a06..675e5d2b8 100644
--- a/minifiers/config.go
+++ b/minifiers/config.go
@@ -35,7 +35,7 @@ var defaultTdewolffConfig = tdewolffConfig{
KeepConditionalComments: true,
KeepEndTags: true,
KeepDefaultAttrVals: true,
- KeepWhitespace: true,
+ KeepWhitespace: false,
},
CSS: css.Minifier{
Precision: 0,
diff --git a/minifiers/minifiers_test.go b/minifiers/minifiers_test.go
index ece8cbd08..9866f67da 100644
--- a/minifiers/minifiers_test.go
+++ b/minifiers/minifiers_test.go
@@ -191,7 +191,7 @@ func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
}
-// Issue 8771
+// Issue 9456
func TestDecodeConfigKeepWhitespace(t *testing.T) {
c := qt.New(t)
v := config.New()
@@ -214,7 +214,7 @@ func TestDecodeConfigKeepWhitespace(t *testing.T) {
KeepDocumentTags: true,
KeepEndTags: false,
KeepQuotes: false,
- KeepWhitespace: true},
+ KeepWhitespace: false},
)
}