Fix wrong ordered list closing on empty lines

This commit is contained in:
bouncepaw 2020-11-03 21:46:27 +05:00
parent a1bce73751
commit 7a0e9ebcc9

View File

@ -91,9 +91,12 @@ func geminiLineToAST(line string, state *GemLexerState, ast *[]Line) {
} }
if "" == strings.TrimSpace(line) { if "" == strings.TrimSpace(line) {
if state.where == "list" || state.where == "number" { if state.where == "list" {
state.where = "" state.where = ""
addLine(state.buf + "</ul>") addLine(state.buf + "</ul>")
} else if state.where == "number" {
state.where = ""
addLine(state.buf + "</ol>")
} }
return return
} }