From ce480a18b865acc21eb6c36dea8fc27b08061603 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Wed, 1 Oct 2025 22:32:41 +0200 Subject: feat(markdown): support list --- mardown/lexer.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mardown/lexer.go') diff --git a/mardown/lexer.go b/mardown/lexer.go index 8450032..c056460 100644 --- a/mardown/lexer.go +++ b/mardown/lexer.go @@ -5,13 +5,17 @@ import "fmt" type lexerType string const ( - lexerBreak lexerType = "break" + lexerBreak lexerType = "break" + lexerEscape lexerType = "escape" lexerModifier lexerType = "modifier" - lexerCode lexerType = "code" - lexerHeader lexerType = "header" - lexerQuote lexerType = "quote" + + lexerCode lexerType = "code" + + lexerHeader lexerType = "header" + lexerQuote lexerType = "quote" + lexerList lexerType = "list" lexerExternal lexerType = "external" @@ -94,6 +98,8 @@ func lex(s string) *lexers { fn(c, lexerExternal) case '\\': fn(c, lexerEscape) + case '-', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.': + fn(c, lexerList) default: fn(c, lexerLiteral) } -- cgit v1.2.3