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/ast_external.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'markdown/ast_external.go') diff --git a/markdown/ast_external.go b/markdown/ast_external.go index ee00eab..8adeea1 100644 --- a/markdown/ast_external.go +++ b/markdown/ast_external.go @@ -6,7 +6,7 @@ import ( "regexp" ) -var externalLink = regexp.MustCompile(`https?://`) +var ExternalLink = regexp.MustCompile(`https?://`) type astLink struct { content block @@ -23,7 +23,7 @@ func (a *astLink) Eval(opt *Option) (template.HTML, *ParseError) { if err != nil { return "", err } - rr := RenderLink(string(content), string(href)) + rr := opt.RenderLink(string(content), string(href)) if a.addSpace { return " " + rr, nil } @@ -31,7 +31,7 @@ func (a *astLink) Eval(opt *Option) (template.HTML, *ParseError) { } func RenderLink(content, href string) template.HTML { - if !externalLink.Match([]byte(href)) { + if !ExternalLink.Match([]byte(href)) { return template.HTML(fmt.Sprintf(`%s`, href, content)) } return template.HTML(fmt.Sprintf(`%s`, href, content)) -- cgit v1.2.3