diff options
| author | William Hergès <william@herges.fr> | 2025-10-04 00:02:29 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-10-04 00:02:29 +0200 |
| commit | 1a2865717e82cbf567ad31622afdfa75f7cbfa1c (patch) | |
| tree | a45d44ba563d0300f554e8cd68eb87f17566bf2d /markdown/ast_quote.go | |
| parent | 40b1f53362105a495c6a486f3488e83d79eb582a (diff) | |
fix(markdown): parsing quote was weird
Diffstat (limited to 'markdown/ast_quote.go')
| -rw-r--r-- | markdown/ast_quote.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/markdown/ast_quote.go b/markdown/ast_quote.go index ebd0527..fa3a878 100644 --- a/markdown/ast_quote.go +++ b/markdown/ast_quote.go @@ -44,7 +44,7 @@ func quote(lxs *lexers) (*astQuote, *ParseError) { for lxs.Next() && n < 2 { switch lxs.Current().Type { case lexerBreak: - n += len(lxs.Current().Value) + n = len(lxs.Current().Value) quoteContinue = false case lexerQuote: n = 0 @@ -63,6 +63,7 @@ func quote(lxs *lexers) (*astQuote, *ParseError) { if err != nil { return nil, err } + lxs.Before() // because we must parse the line break if !source { tree.quote = append(tree.quote, p) @@ -77,5 +78,6 @@ func quote(lxs *lexers) (*astQuote, *ParseError) { return tree, nil } } + lxs.Before() // because the code did not use it return tree, nil } |
