parser/metadecoders: Consolidate the metadata decoders

See #5324
This commit is contained in:
Bjørn Erik Pedersen
2018-10-20 11:16:18 +02:00
parent 44da60d869
commit 129c27ee6e
22 changed files with 624 additions and 808 deletions

View File

@@ -42,7 +42,7 @@ import (
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/parser"
"github.com/gohugoio/hugo/parser/metadecoders"
flag "github.com/spf13/pflag"
"github.com/fsnotify/fsnotify"
@@ -1017,7 +1017,7 @@ func (c *commandeer) isThemeVsHugoVersionMismatch(fs afero.Fs) (dir string, mism
b, err := afero.ReadFile(fs, path)
tomlMeta, err := parser.HandleTOMLMetaData(b)
tomlMeta, err := metadecoders.UnmarshalToMap(b, metadecoders.TOML)
if err != nil {
continue