mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 05:20:26 +00:00
Do not ignore empty lines in preformatted blocks
This commit is contained in:
parent
26aaabe9e8
commit
17877ca585
@ -45,13 +45,17 @@ func geminiLineToAST(line string, state *GemLexerState, ast *[]Line) {
|
||||
*ast = append(*ast, Line{id: state.id, contents: text})
|
||||
}
|
||||
|
||||
// Process empty lines depending on the current state
|
||||
if "" == strings.TrimSpace(line) {
|
||||
if state.where == "list" {
|
||||
switch state.where {
|
||||
case "list":
|
||||
state.where = ""
|
||||
addLine(state.buf + "</ul>")
|
||||
} else if state.where == "number" {
|
||||
case "number":
|
||||
state.where = ""
|
||||
addLine(state.buf + "</ol>")
|
||||
case "pre":
|
||||
state.buf += "\n"
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user