mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 13:30: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})
|
*ast = append(*ast, Line{id: state.id, contents: text})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process empty lines depending on the current state
|
||||||
if "" == strings.TrimSpace(line) {
|
if "" == strings.TrimSpace(line) {
|
||||||
if state.where == "list" {
|
switch state.where {
|
||||||
|
case "list":
|
||||||
state.where = ""
|
state.where = ""
|
||||||
addLine(state.buf + "</ul>")
|
addLine(state.buf + "</ul>")
|
||||||
} else if state.where == "number" {
|
case "number":
|
||||||
state.where = ""
|
state.where = ""
|
||||||
addLine(state.buf + "</ol>")
|
addLine(state.buf + "</ol>")
|
||||||
|
case "pre":
|
||||||
|
state.buf += "\n"
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user