1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-07 02:57:20 +00:00

Fix markdown frontmatter rendering (#34102)

Fix #34101
This commit is contained in:
wxiaoguang
2025-04-03 13:48:24 +08:00
committed by GitHub
parent f94ee4fd3c
commit ba921fd903
8 changed files with 136 additions and 106 deletions

View File

@ -184,11 +184,7 @@ func render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error
// Preserve original length.
bufWithMetadataLength := len(buf)
rc := &RenderConfig{
Meta: markup.RenderMetaAsDetails,
Icon: "table",
Lang: "",
}
rc := &RenderConfig{Meta: markup.RenderMetaAsDetails}
buf, _ = ExtractMetadataBytes(buf, rc)
metaLength := bufWithMetadataLength - len(buf)