aboutsummaryrefslogtreecommitdiff
path: root/mardown/lexer.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-01 09:43:06 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-01 09:43:06 +0200
commitc49daa8fe6fdcf1c7fab08ee32f1ff994979c401 (patch)
tree6ac743ddd35563893f92f2fcba73907657d36191 /mardown/lexer.go
parentb07dd267fc10812f7e94bf6d9be08667537dd331 (diff)
fix(markdown): paragraph parse always skip one char
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 {