diff options
| author | William Hergès <william@herges.fr> | 2025-10-03 22:22:40 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-10-03 22:22:40 +0200 |
| commit | 40b1f53362105a495c6a486f3488e83d79eb582a (patch) | |
| tree | b84609a49ad55881d0e54f72a474d3bbb1db31ae /markdown/ast_paragraph.go | |
| parent | ce6a2da035dc045510157a0eeefaebf56f0e8958 (diff) | |
feat(markdown): eval option to setup custom image source func
Diffstat (limited to 'markdown/ast_paragraph.go')
| -rw-r--r-- | markdown/ast_paragraph.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown/ast_paragraph.go b/markdown/ast_paragraph.go index 8590c3e..ae1f657 100644 --- a/markdown/ast_paragraph.go +++ b/markdown/ast_paragraph.go @@ -15,10 +15,10 @@ type astParagraph struct { oneLine bool } -func (a *astParagraph) Eval() (template.HTML, *ParseError) { +func (a *astParagraph) Eval(opt *Option) (template.HTML, *ParseError) { var content template.HTML for _, c := range a.content { - ct, err := c.Eval() + ct, err := c.Eval(opt) if err != nil { return "", err } @@ -95,6 +95,6 @@ func paragraph(lxs *lexers, oneLine bool) (*astParagraph, *ParseError) { type astLiteral string -func (a astLiteral) Eval() (template.HTML, *ParseError) { +func (a astLiteral) Eval(_ *Option) (template.HTML, *ParseError) { return template.HTML(template.HTMLEscapeString(string(a))), nil } |
