aboutsummaryrefslogtreecommitdiff
path: root/mardown/ast_list.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 11:05:30 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 11:05:30 +0200
commitc176f81dc60d558edfe626ac805a0173c12f317d (patch)
tree59706257e2e8b30b6dcec9ed609c5ff676524a5b /mardown/ast_list.go
parent597e15a5cde4127105ce7a6109d52491d6976be7 (diff)
feat(markdown): support * as unordered list
Diffstat (limited to 'mardown/ast_list.go')
-rw-r--r--mardown/ast_list.go6
1 files changed, 3 insertions, 3 deletions
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 ""
}