aboutsummaryrefslogtreecommitdiff
path: root/markdown/ast_external.go
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/ast_external.go')
-rw-r--r--markdown/ast_external.go4
1 files changed, 2 insertions, 2 deletions
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