Add Goldmark as the new default markdown handler

This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo.

If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration:

```toml
[markup]
defaultMarkdownHandler="blackfriday"
```

Fixes #5963
Fixes #1778
Fixes #6355
This commit is contained in:
Bjørn Erik Pedersen 2019-11-06 20:10:47 +01:00
parent a3fe5e5e35
commit bfb9613a14
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
69 changed files with 3424 additions and 1668 deletions

View file

@ -156,11 +156,11 @@ Hugo = "Rules"
func TestTestRemarshalError(t *testing.T) {
t.Parallel()
c := qt.New(t)
v := viper.New()
v.Set("contentDir", "content")
ns := New(newDeps(v))
c := qt.New(t)
_, err := ns.Remarshal("asdf", "asdf")
c.Assert(err, qt.Not(qt.IsNil))
@ -169,3 +169,19 @@ func TestTestRemarshalError(t *testing.T) {
c.Assert(err, qt.Not(qt.IsNil))
}
func TestTestRemarshalMapInput(t *testing.T) {
t.Parallel()
c := qt.New(t)
v := viper.New()
v.Set("contentDir", "content")
ns := New(newDeps(v))
input := map[string]interface{}{
"hello": "world",
}
output, err := ns.Remarshal("toml", input)
c.Assert(err, qt.IsNil)
c.Assert(output, qt.Equals, "hello = \"world\"\n")
}