mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
minifiers: Make keepWhitespace = false default for HTML (note)
Closes #9456
This commit is contained in:
parent
53a6210d82
commit
c97fed08f9
3 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@ var defaultTdewolffConfig = tdewolffConfig{
|
|||
KeepConditionalComments: true,
|
||||
KeepEndTags: true,
|
||||
KeepDefaultAttrVals: true,
|
||||
KeepWhitespace: true,
|
||||
KeepWhitespace: false,
|
||||
},
|
||||
CSS: css.Minifier{
|
||||
Precision: 0,
|
||||
|
|
|
@ -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},
|
||||
)
|
||||
|
||||
}
|
||||
|
|
|
@ -38,5 +38,5 @@ func TestTransform(t *testing.T) {
|
|||
c.Assert(transformed.RelPermalink(), qt.Equals, "/hugo.min.html")
|
||||
content, err := transformed.(resource.ContentProvider).Content()
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(content, qt.Equals, "<h1> Hugo Rocks! </h1>")
|
||||
c.Assert(content, qt.Equals, "<h1>Hugo Rocks!</h1>")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue