Added support for footnotes and fixed category AJAX post

This commit is contained in:
Leon Mika 2026-03-29 10:45:45 +11:00
parent 023574aac6
commit 9b20665d11
4 changed files with 18 additions and 2 deletions

View file

@ -22,7 +22,7 @@ type Renderer struct {
func NewRendererForUI() *Renderer {
mdParser := goldmark.New(
goldmark.WithExtensions(extension.GFM),
goldmark.WithExtensions(extension.GFM, extension.Footnote),
goldmark.WithRendererOptions(
gm_html.WithUnsafe(),
),
@ -48,7 +48,7 @@ func NewRendererForUI() *Renderer {
func NewRendererForSite() *Renderer {
mdParser := goldmark.New(
goldmark.WithExtensions(extension.GFM),
goldmark.WithExtensions(extension.GFM, extension.Footnote),
goldmark.WithParserOptions(
parser.WithAutoHeadingID(),
),