mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
@@ -124,7 +124,7 @@ func decodeConfig(cfg config.Provider) (conf minifyConfig, err error) {
|
||||
|
||||
func init() {
|
||||
docsProvider := func() docshelper.DocProvider {
|
||||
return docshelper.DocProvider{"config": map[string]interface{}{"minify": parser.LowerCaseCamelJSONMarshaller{Value: defaultConfig}}}
|
||||
return docshelper.DocProvider{"config": map[string]any{"minify": parser.LowerCaseCamelJSONMarshaller{Value: defaultConfig}}}
|
||||
}
|
||||
docshelper.AddDocProviderFunc(docsProvider)
|
||||
}
|
||||
|
@@ -25,10 +25,10 @@ func TestConfig(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
v := config.New()
|
||||
|
||||
v.Set("minify", map[string]interface{}{
|
||||
v.Set("minify", map[string]any{
|
||||
"disablexml": true,
|
||||
"tdewolff": map[string]interface{}{
|
||||
"html": map[string]interface{}{
|
||||
"tdewolff": map[string]any{
|
||||
"html": map[string]any{
|
||||
"keepwhitespace": false,
|
||||
},
|
||||
},
|
||||
|
@@ -77,10 +77,10 @@ func TestNew(t *testing.T) {
|
||||
func TestConfigureMinify(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
v := config.New()
|
||||
v.Set("minify", map[string]interface{}{
|
||||
v.Set("minify", map[string]any{
|
||||
"disablexml": true,
|
||||
"tdewolff": map[string]interface{}{
|
||||
"html": map[string]interface{}{
|
||||
"tdewolff": map[string]any{
|
||||
"html": map[string]any{
|
||||
"keepwhitespace": true,
|
||||
},
|
||||
},
|
||||
@@ -137,8 +137,8 @@ func TestJSONRoundTrip(t *testing.T) {
|
||||
}`} {
|
||||
|
||||
var b bytes.Buffer
|
||||
m1 := make(map[string]interface{})
|
||||
m2 := make(map[string]interface{})
|
||||
m1 := make(map[string]any)
|
||||
m2 := make(map[string]any)
|
||||
c.Assert(json.Unmarshal([]byte(test), &m1), qt.IsNil)
|
||||
c.Assert(m.Minify(media.JSONType, &b, strings.NewReader(test)), qt.IsNil)
|
||||
c.Assert(json.Unmarshal(b.Bytes(), &m2), qt.IsNil)
|
||||
@@ -172,13 +172,13 @@ func TestBugs(t *testing.T) {
|
||||
func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
v := config.New()
|
||||
v.Set("minify", map[string]interface{}{
|
||||
v.Set("minify", map[string]any{
|
||||
"disablexml": true,
|
||||
"tdewolff": map[string]interface{}{
|
||||
"css": map[string]interface{}{
|
||||
"tdewolff": map[string]any{
|
||||
"css": map[string]any{
|
||||
"decimal": 3,
|
||||
},
|
||||
"svg": map[string]interface{}{
|
||||
"svg": map[string]any{
|
||||
"decimal": 3,
|
||||
},
|
||||
},
|
||||
@@ -195,9 +195,9 @@ func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
|
||||
func TestDecodeConfigKeepWhitespace(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
v := config.New()
|
||||
v.Set("minify", map[string]interface{}{
|
||||
"tdewolff": map[string]interface{}{
|
||||
"html": map[string]interface{}{
|
||||
v.Set("minify", map[string]any{
|
||||
"tdewolff": map[string]any{
|
||||
"html": map[string]any{
|
||||
"keepEndTags": false,
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user