From c176f81dc60d558edfe626ac805a0173c12f317d Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 2 Oct 2025 11:05:30 +0200 Subject: feat(markdown): support * as unordered list --- mardown/ast_list.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mardown/ast_list.go') diff --git a/mardown/ast_list.go b/mardown/ast_list.go index 39be70c..8eb451a 100644 --- a/mardown/ast_list.go +++ b/mardown/ast_list.go @@ -34,8 +34,7 @@ func (a *astList) Eval() (template.HTML, error) { func list(lxs *lexers) (block, error) { tree := new(astList) - current := lxs.Current().Value - tree.tag = detectListType(current) + tree.tag = detectListType(lxs.Current().Value) if len(tree.tag) == 0 { return paragraph(lxs, false) } @@ -64,7 +63,8 @@ func list(lxs *lexers) (block, error) { } func detectListType(val string) listType { - if []rune(val)[0] == '-' { + first := []rune(val)[0] + if first == '-' || first == '*' { if len(val) > 1 { return "" } -- cgit v1.2.3