aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-04-09 11:54:50 +0100
committerGitHub <noreply@github.com>2020-04-09 11:54:50 +0100
commit0be25e21501ccf8c0f27e2fa87aba00ad304c951 (patch)
treed6417c87f44776351ca1678df2a5cf1a2772cf10 /modules/markup/markdown
parentc02dee8bc4fbf4aa3afce33f56d1838d5f0c738f (diff)
downloadgitea-0be25e21501ccf8c0f27e2fa87aba00ad304c951.tar.gz
gitea-0be25e21501ccf8c0f27e2fa87aba00ad304c951.zip
Handle yaml frontmatter (#11016)
Add goldmark-meta to render yaml frontmatter as a table Fix #5377 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/markup/markdown')
-rw-r--r--modules/markup/markdown/markdown.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go
index 81b5635d3b..c48bbab301 100644
--- a/modules/markup/markdown/markdown.go
+++ b/modules/markup/markdown/markdown.go
@@ -16,6 +16,7 @@ import (
giteautil "code.gitea.io/gitea/modules/util"
"github.com/yuin/goldmark"
+ meta "github.com/yuin/goldmark-meta"
"github.com/yuin/goldmark/extension"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark/renderer"
@@ -53,6 +54,7 @@ func RenderRaw(body []byte, urlPrefix string, wikiMarkdown bool) []byte {
extension.Ellipsis: nil,
}),
),
+ meta.New(meta.WithTable()),
),
goldmark.WithParserOptions(
parser.WithAttribute(),