Skip to content

Commit

Permalink
Add GitHub style code fence support to mmark. Fixes gohugoio#1258.
Browse files Browse the repository at this point in the history
  • Loading branch information
bramp committed Dec 17, 2015
1 parent 5bb8c7d commit 2d6c8fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions helpers/content_renderer.go
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/miekg/mmark"
"github.com/russross/blackfriday"
"github.com/spf13/viper"
"github.com/miekg/mmark"
)

// Wraps a blackfriday.Renderer, typically a blackfriday.Html
Expand Down
3 changes: 3 additions & 0 deletions helpers/content_renderer_test.go
Expand Up @@ -53,6 +53,9 @@ func TestCodeFence(t *testing.T) {
data := []test{
{true, "<html></html>", "<div class=\"highlight\"><pre><code class=\"language-html\" data-lang=\"html\"><span class=\"nt\">&lt;html&gt;&lt;/html&gt;</span>\n</code></pre></div>\n"},
{false, "<html></html>", "<pre><code class=\"language-html\">&lt;html&gt;&lt;/html&gt;</code></pre>\n"},
// TODO(bramp) Merge conflict, unsure which to use, above or below
{true, "<html></html>", "<div class=\"highlight\"><pre><span class=\"nt\">&lt;html&gt;&lt;/html&gt;</span>\n</pre></div>\n"},
{false, "<html></html>", "<pre><code class=\"language-html\">&lt;html&gt;&lt;/html&gt;</code></pre>\n"},
}

viper.Reset()
Expand Down

0 comments on commit 2d6c8fb

Please sign in to comment.