aboutsummaryrefslogtreecommitdiff
path: root/mardown/lexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'mardown/lexer.go')
-rw-r--r--mardown/lexer.go4
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 {