diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-09-30 21:00:51 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-09-30 21:00:51 +0200 |
| commit | 3d3ccdec245b5a5d1c1f01d0b6972959332c882e (patch) | |
| tree | ef4e94c4711590ff85bc326bbed848740ef14584 /mardown/lexer.go | |
| parent | e20acb05fd33b8fbcfafee4b72734224093c2d20 (diff) | |
fix(markdown): wrong return in lexer next
Diffstat (limited to 'mardown/lexer.go')
| -rw-r--r-- | mardown/lexer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mardown/lexer.go b/mardown/lexer.go index afac4d7..7ab393f 100644 --- a/mardown/lexer.go +++ b/mardown/lexer.go @@ -34,7 +34,7 @@ type lexers struct { func (l *lexers) Next() bool { l.current++ - return l.Finished() + return !l.Finished() } func (l *lexers) Current() lexer { @@ -42,7 +42,7 @@ func (l *lexers) Current() lexer { } func (l *lexers) Finished() bool { - return l.current+1 >= len(l.lexers) + return l.current >= len(l.lexers)-1 } func (l *lexers) String() string { |
