From a815c291074b454d4bb1a31067cd363c84df1360 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Fri, 12 Dec 2025 19:21:22 +0100 Subject: refactor(frontend): remove JS files --- markdown/eval.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'markdown/eval.go') diff --git a/markdown/eval.go b/markdown/eval.go index 56bb989..376e577 100644 --- a/markdown/eval.go +++ b/markdown/eval.go @@ -3,7 +3,8 @@ package markdown import "html/template" type Option struct { - ImageSource func(string) string + ImageSource func(source string) string + RenderLink func(content, href string) template.HTML } func Parse(s string, opt *Option) (template.HTML, *ParseError) { @@ -18,6 +19,9 @@ func Parse(s string, opt *Option) (template.HTML, *ParseError) { if opt.ImageSource == nil { opt.ImageSource = func(s string) string { return s } } + if opt.RenderLink == nil { + opt.RenderLink = RenderLink + } return tree.Eval(opt) } -- cgit v1.2.3