diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-01 22:32:41 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-01 22:32:48 +0200 |
| commit | ce480a18b865acc21eb6c36dea8fc27b08061603 (patch) | |
| tree | f17625ac33ebde39f7c3188798b6a8fa9c9311eb /mardown/lexer.go | |
| parent | 1ce93d83321c751265e4207ebf6dc73a280482c6 (diff) | |
feat(markdown): support list
Diffstat (limited to 'mardown/lexer.go')
| -rw-r--r-- | mardown/lexer.go | 14 |
1 files changed, 10 insertions, 4 deletions
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) } |
