This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/answer.git
The following commit(s) were added to refs/heads/dev by this push:
new ed2a5ba8 feat: add footnote extension to markdown converter
ed2a5ba8 is described below
commit ed2a5ba8f623038f0880f9a8cda242873f7f2179
Author: Luffy <[email protected]>
AuthorDate: Thu Mar 13 11:58:52 2025 +0800
feat: add footnote extension to markdown converter
---
pkg/converter/markdown.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.go
index eb121c01..1789a32c 100644
--- a/pkg/converter/markdown.go
+++ b/pkg/converter/markdown.go
@@ -40,7 +40,7 @@ import (
// Markdown2HTML convert markdown to html
func Markdown2HTML(source string) string {
mdConverter := goldmark.New(
- goldmark.WithExtensions(&DangerousHTMLFilterExtension{},
extension.GFM),
+ goldmark.WithExtensions(&DangerousHTMLFilterExtension{},
extension.GFM, extension.Footnote),
goldmark.WithParserOptions(
parser.WithAutoHeadingID(),
),