From 3d3ccdec245b5a5d1c1f01d0b6972959332c882e Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 30 Sep 2025 21:00:51 +0200 Subject: fix(markdown): wrong return in lexer next --- mardown/lexer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mardown/lexer.go') 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 { -- cgit v1.2.3