1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-13 05:50:27 +00:00

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 state.where == "list" || state.where == "number" {
if state.where == "list" {
state.where = ""
addLine(state.buf + "</ul>")
} else if state.where == "number" {
state.where = ""
addLine(state.buf + "</ol>")
}
return
}