Prepare for Goldmark

This commmit prepares for the addition of Goldmark as the new Markdown renderer in Hugo.

This introduces a new `markup` package with some common interfaces and each implementation in its own package.

See #5963
This commit is contained in:
Bjørn Erik Pedersen
2019-08-16 15:55:03 +02:00
parent 366ee4d8da
commit 5f6b6ec689
39 changed files with 1739 additions and 986 deletions

View File

@@ -29,6 +29,7 @@ import (
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/langs"
"github.com/spf13/afero"
"github.com/spf13/viper"
)
@@ -894,7 +895,7 @@ func ToTstXIs(slice interface{}) []TstXI {
func newDeps(cfg config.Provider) *deps.Deps {
l := langs.NewLanguage("en", cfg)
l.Set("i18nDir", "i18n")
cs, err := helpers.NewContentSpec(l)
cs, err := helpers.NewContentSpec(l, loggers.NewErrorLogger(), afero.NewMemMapFs())
if err != nil {
panic(err)
}