Skip to content

Commit 0be25e2

Browse files
authored
Handle yaml frontmatter (#11016)
Add goldmark-meta to render yaml frontmatter as a table Fix #5377 Signed-off-by: Andrew Thornton <[email protected]>
1 parent c02dee8 commit 0be25e2

File tree

10 files changed

+422
-0
lines changed

10 files changed

+422
-0
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ require (
106106
github.com/urfave/cli v1.20.0
107107
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
108108
github.com/yuin/goldmark v1.1.25
109+
github.com/yuin/goldmark-meta v0.0.0-20191126180153-f0638e958b60
109110
go.etcd.io/bbolt v1.3.3 // indirect
110111
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073
111112
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e

go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,11 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
614614
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
615615
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53 h1:HsIQ6yAjfjQ3IxPGrTusxp6Qxn92gNVq2x5CbvQvx3w=
616616
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53/go.mod h1:f6elajwZV+xceiaqgRL090YzLEDGSbqr3poGL3ZgXYo=
617+
github.com/yuin/goldmark v1.1.7/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
617618
github.com/yuin/goldmark v1.1.25 h1:isv+Q6HQAmmL2Ofcmg8QauBmDPlUUnSoNhEcC940Rds=
618619
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
620+
github.com/yuin/goldmark-meta v0.0.0-20191126180153-f0638e958b60 h1:gZucqLjL1eDzVWrXj4uiWeMbAopJlBR2mKQAsTGdPwo=
621+
github.com/yuin/goldmark-meta v0.0.0-20191126180153-f0638e958b60/go.mod h1:i9VhcIHN2PxXMbQrKqXNueok6QNONoPjNMoj9MygVL0=
619622
github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
620623
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
621624
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=

modules/markup/markdown/markdown.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
giteautil "code.gitea.io/gitea/modules/util"
1717

1818
"github.com/yuin/goldmark"
19+
meta "github.com/yuin/goldmark-meta"
1920
"github.com/yuin/goldmark/extension"
2021
"github.com/yuin/goldmark/parser"
2122
"github.com/yuin/goldmark/renderer"
@@ -53,6 +54,7 @@ func RenderRaw(body []byte, urlPrefix string, wikiMarkdown bool) []byte {
5354
extension.Ellipsis: nil,
5455
}),
5556
),
57+
meta.New(meta.WithTable()),
5658
),
5759
goldmark.WithParserOptions(
5860
parser.WithAttribute(),

vendor/github.com/yuin/goldmark-meta/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/yuin/goldmark-meta/LICENSE

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/yuin/goldmark-meta/README.md

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/yuin/goldmark-meta/go.mod

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/yuin/goldmark-meta/go.sum

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)