From 1a2865717e82cbf567ad31622afdfa75f7cbfa1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sat, 4 Oct 2025 00:02:29 +0200 Subject: fix(markdown): parsing quote was weird --- markdown/ast.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'markdown/ast.go') diff --git a/markdown/ast.go b/markdown/ast.go index b19fd07..9c9816e 100644 --- a/markdown/ast.go +++ b/markdown/ast.go @@ -19,6 +19,12 @@ type tree struct { } func (t *tree) Eval(opt *Option) (template.HTML, *ParseError) { + if opt == nil { + opt = new(Option) + } + if opt.ImageSource == nil { + opt.ImageSource = func(s string) string { return s } + } var content template.HTML for _, c := range t.blocks { ct, err := c.Eval(opt) -- cgit v1.2.3