From 7a0e9ebcc9b47dcc9c0185c73bdf9a2bfe301c24 Mon Sep 17 00:00:00 2001 From: bouncepaw Date: Tue, 3 Nov 2020 21:46:27 +0500 Subject: [PATCH] Fix wrong ordered list closing on empty lines --- markup/lexer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/markup/lexer.go b/markup/lexer.go index dab1aaf..d2002b0 100644 --- a/markup/lexer.go +++ b/markup/lexer.go @@ -91,9 +91,12 @@ func geminiLineToAST(line string, state *GemLexerState, ast *[]Line) { } if "" == strings.TrimSpace(line) { - if state.where == "list" || state.where == "number" { + if state.where == "list" { state.where = "" addLine(state.buf + "") + } else if state.where == "number" { + state.where = "" + addLine(state.buf + "") } return }