aboutsummaryrefslogtreecommitdiff
path: root/mardown/lexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'mardown/lexer.go')
-rw-r--r--mardown/lexer.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/mardown/lexer.go b/mardown/lexer.go
index 4eaaf16..f87e61c 100644
--- a/mardown/lexer.go
+++ b/mardown/lexer.go
@@ -45,6 +45,11 @@ func (l *lexers) Finished() bool {
return l.current >= len(l.lexers)
}
+func (l *lexers) Before() bool {
+ l.current--
+ return l.current >= 0 && !l.Finished()
+}
+
func (l *lexers) String() string {
s := "Lexers["
for _, l := range l.lexers {