1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

deps: Update github.com/tdewolff/minify/v2 v2.6.2 => v2.9.13

Fixes #8258
This commit is contained in:
Bjørn Erik Pedersen
2021-02-18 09:32:34 +01:00
parent 968dd7a711
commit 66beac99c6
5 changed files with 53 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ func TestNew(t *testing.T) {
var rawJS string
var minJS string
rawJS = " var foo =1 ; foo ++ ; "
minJS = "var foo=1;foo++;"
minJS = "var foo=1;foo++"
var rawJSON string
var minJSON string
@@ -165,3 +165,26 @@ func TestBugs(t *testing.T) {
c.Assert(b.String(), qt.Equals, test.expectedMinString)
}
}
// Renamed to Precision in v2.7.0. Check that we support both.
func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
c := qt.New(t)
v := viper.New()
v.Set("minify", map[string]interface{}{
"disablexml": true,
"tdewolff": map[string]interface{}{
"css": map[string]interface{}{
"decimal": 3,
},
"svg": map[string]interface{}{
"decimal": 3,
},
},
})
conf, err := decodeConfig(v)
c.Assert(err, qt.IsNil)
c.Assert(conf.Tdewolff.CSS.Precision, qt.Equals, 3)
}