diff options
author | zeripath <art27@cantab.net> | 2020-04-09 11:54:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 11:54:50 +0100 |
commit | 0be25e21501ccf8c0f27e2fa87aba00ad304c951 (patch) | |
tree | d6417c87f44776351ca1678df2a5cf1a2772cf10 /modules/markup/markdown | |
parent | c02dee8bc4fbf4aa3afce33f56d1838d5f0c738f (diff) | |
download | gitea-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.go | 2 |
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(), |