Remove Blackfriday markdown engine

It has been deprecated for a long time, its v1 version is not maintained anymore, and there are many known issues. Goldmark should be
a mature replacement by now.

Closes #9934
This commit is contained in:
Bjørn Erik Pedersen 2022-05-28 11:01:47 +02:00
parent 3b478f50b7
commit 0f8dc47037
22 changed files with 71 additions and 1675 deletions

View file

@ -45,7 +45,6 @@ func TestConfig(t *testing.T) {
c.Assert(err, qt.IsNil)
c.Assert(conf.Goldmark.Renderer.Unsafe, qt.Equals, true)
c.Assert(conf.BlackFriday.Fractions, qt.Equals, true)
c.Assert(conf.Goldmark.Parser.Attribute.Title, qt.Equals, true)
c.Assert(conf.Goldmark.Parser.Attribute.Block, qt.Equals, false)
@ -53,37 +52,4 @@ func TestConfig(t *testing.T) {
c.Assert(conf.AsciidocExt.Extensions[0], qt.Equals, "asciidoctor-html5s")
})
c.Run("legacy", func(c *qt.C) {
c.Parallel()
v := config.New()
v.Set("blackfriday", map[string]any{
"angledQuotes": true,
})
v.Set("footnoteAnchorPrefix", "myprefix")
v.Set("footnoteReturnLinkContents", "myreturn")
v.Set("pygmentsStyle", "hugo")
v.Set("pygmentsCodefencesGuessSyntax", true)
v.Set("markup", map[string]any{
"goldmark": map[string]any{
"parser": map[string]any{
"attribute": false, // Was changed to a struct in 0.81.0
},
},
})
conf, err := Decode(v)
c.Assert(err, qt.IsNil)
c.Assert(conf.BlackFriday.AngledQuotes, qt.Equals, true)
c.Assert(conf.BlackFriday.FootnoteAnchorPrefix, qt.Equals, "myprefix")
c.Assert(conf.BlackFriday.FootnoteReturnLinkContents, qt.Equals, "myreturn")
c.Assert(conf.Highlight.Style, qt.Equals, "hugo")
c.Assert(conf.Highlight.CodeFences, qt.Equals, true)
c.Assert(conf.Highlight.GuessSyntax, qt.Equals, true)
c.Assert(conf.Goldmark.Parser.Attribute.Title, qt.Equals, false)
c.Assert(conf.Goldmark.Parser.Attribute.Block, qt.Equals, false)
})
}