Skip to content

Commit

Permalink
Remove mmark
Browse files Browse the repository at this point in the history
Closes #9350
  • Loading branch information
bep committed Jan 4, 2022
1 parent 2b6063c commit 1651beb
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 276 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ require (
github.com/kyokomi/emoji/v2 v2.2.8
github.com/magefile/mage v1.11.0
github.com/mattn/go-isatty v0.0.14
github.com/miekg/mmark v1.3.6
github.com/mitchellh/hashstructure v1.1.0
github.com/mitchellh/mapstructure v1.4.3
github.com/muesli/smartcrop v0.3.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,6 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/mmark v1.3.6 h1:t47x5vThdwgLJzofNsbsAl7gmIiJ7kbDQN5BxwBmwvY=
github.com/miekg/mmark v1.3.6/go.mod h1:w7r9mkTvpS55jlfyn22qJ618itLryxXBhA7Jp3FIlkw=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
Expand Down
3 changes: 0 additions & 3 deletions helpers/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ func (c *ContentSpec) ResolveMarkup(in string) string {
case "html", "htm":
return "html"
default:
if in == "mmark" {
Deprecated("Markup type mmark", "See https://gohugo.io//content-management/formats/#list-of-content-formats", true)
}
if conv := c.Converters.Get(in); conv != nil {
return conv.Name()
}
Expand Down
1 change: 0 additions & 1 deletion helpers/general_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func TestResolveMarkup(t *testing.T) {
{"rst", "rst"},
{"pandoc", "pandoc"},
{"pdc", "pandoc"},
{"mmark", "mmark"},
{"html", "html"},
{"htm", "html"},
{"org", "org"},
Expand Down
1 change: 0 additions & 1 deletion hugolib/page_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ func testAllMarkdownEnginesForPages(t *testing.T,
shouldExecute func() bool
}{
{"md", func() bool { return true }},
{"mmark", func() bool { return true }},
{"ad", func() bool { return asciidocext.Supports() }},
{"rst", func() bool { return rst.Supports() }},
}
Expand Down
17 changes: 5 additions & 12 deletions hugolib/shortcode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,17 +533,7 @@ e`,
filepath.FromSlash("public/sect/doc8/index.html"),
"<div class=\"document\">\n\n\n<p><strong>Shortcodes:</strong> <em>b: b c: c</em></p>\n</div>",
},
{
"sect/doc9.mmark", `
---
menu:
main:
parent: 'parent'
---
**Shortcodes:** *b: {{< b >}} c: {{% c %}}*`,
filepath.FromSlash("public/sect/doc9/index.html"),
"<p><strong>Shortcodes:</strong> <em>b: b c: c</em></p>\n",
},

// Issue #1229: Menus not available in shortcode.
{
"sect/doc10.md", `---
Expand All @@ -562,6 +552,9 @@ tags:
"sect/doc11.md", `---
tags:
- Bugs
menu:
main:
parent: 'parent'
---
**Tags:** {{< tags >}}`,
filepath.FromSlash("public/sect/doc11/index.html"),
Expand Down Expand Up @@ -1390,7 +1383,7 @@ outputs: ["html", "css", "csv", "json"]

b.Build(BuildCfg{})

//helpers.PrintFs(b.Fs.Destination, "public", os.Stdout)
// helpers.PrintFs(b.Fs.Destination, "public", os.Stdout)

for i := 0; i < numPages; i++ {
b.AssertFileContent(fmt.Sprintf("public/page%d/index.html", i), "Short-HTML")
Expand Down
4 changes: 0 additions & 4 deletions markup/markup.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/gohugoio/hugo/markup/asciidocext"
"github.com/gohugoio/hugo/markup/blackfriday"
"github.com/gohugoio/hugo/markup/converter"
"github.com/gohugoio/hugo/markup/mmark"
"github.com/gohugoio/hugo/markup/pandoc"
"github.com/gohugoio/hugo/markup/rst"
)
Expand Down Expand Up @@ -73,9 +72,6 @@ func NewConverterProvider(cfg converter.ProviderConfig) (ConverterProvider, erro
if err := add(blackfriday.Provider); err != nil {
return nil, err
}
if err := add(mmark.Provider); err != nil {
return nil, err
}
if err := add(asciidocext.Provider, "ad", "adoc"); err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion markup/markup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func TestConverterRegistry(t *testing.T) {
c.Assert(r.Get("markdown").Name(), qt.Equals, "goldmark")

checkName("goldmark")
checkName("mmark")
checkName("asciidocext")
checkName("rst")
checkName("pandoc")
Expand Down
137 changes: 0 additions & 137 deletions markup/mmark/convert.go

This file was deleted.

72 changes: 0 additions & 72 deletions markup/mmark/convert_test.go

This file was deleted.

42 changes: 0 additions & 42 deletions markup/mmark/renderer.go

This file was deleted.

0 comments on commit 1651beb

Please sign in to comment.