From ce6a2da035dc045510157a0eeefaebf56f0e8958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 3 Oct 2025 22:15:12 +0200 Subject: fix(markdown): external source never stopped --- markdown/ast_external.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'markdown/ast_external.go') diff --git a/markdown/ast_external.go b/markdown/ast_external.go index a172b2b..ea78450 100644 --- a/markdown/ast_external.go +++ b/markdown/ast_external.go @@ -119,7 +119,7 @@ func parseExternal(lxs *lexers, withSource bool) (string, string, []*astParagrap return "", "", nil, false } n += len(lxs.Current().Value) - if first != "" && end != "" { + if n < 2 && first != "" && end != "" { if !lxs.Next() { return first, end, ps, true } @@ -127,8 +127,8 @@ func parseExternal(lxs *lexers, withSource bool) (string, string, []*astParagrap if !ok { return "", "", nil, false } - lxs.Before() // because we must parse lexerBreak } + lxs.Before() // because we must parse lexerBreak and the next call must parse the next value case lexerExternal: if first != "" && end != "" { return "", "", nil, false -- cgit v1.2.3