diff --git a/markup/lexer.go b/markup/lexer.go index d71e497..2f1d3fc 100644 --- a/markup/lexer.go +++ b/markup/lexer.go @@ -107,6 +107,8 @@ func geminiLineToAST(line string, state *GemLexerState, ast *[]Line) { goto preformattedState case "list": goto listState + case "number": + goto numberState default: goto normalState } @@ -146,6 +148,22 @@ listState: } return +numberState: + switch { + case startsWith("*. "): + state.buf += fmt.Sprintf("\t
", state.id, strings.TrimPrefix(line, "```"))
+ default:
+ state.where = ""
+ addLine(state.buf + "")
+ goto normalState
+ }
+ return
+
normalState:
state.id++
switch {
@@ -157,6 +175,10 @@ normalState:
state.where = "list"
state.buf = fmt.Sprintf("\n", state.id)
goto listState
+ case startsWith("*. "):
+ state.where = "number"
+ state.buf = fmt.Sprintf("\n", state.id)
+ goto numberState
case startsWith("###### "):
addLine(fmt.Sprintf(
diff --git a/metarrhiza b/metarrhiza
index a54be90..9fa5334 160000
--- a/metarrhiza
+++ b/metarrhiza
@@ -1 +1 @@
-Subproject commit a54be905923b10524d74435fb62dbdd9a0aac06a
+Subproject commit 9fa5334ee958c02fbb327c002bf646e648a5a1be