mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
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:
parent
a3fe5e5e35
commit
bfb9613a14
69 changed files with 3424 additions and 1668 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue