ordered list prefix

This commit is contained in:
Pagwin 2025-12-10 15:22:08 -05:00
parent 628d85a8f3
commit 0acf1668c0
No known key found for this signature in database
GPG key ID: 81137023740CA260

View file

@ -151,7 +151,8 @@ unorderedListBlock = listBlock Unordered unordered_prefix (\level -> unwrap <$>
orderedListBlock :: (Logger m, Characters s) => Int -> Parser s m Element
orderedListBlock = listBlock Ordered ordered_prefix (\level -> unwrap <$> ((try $ unorderedListBlock level) <|> orderedListBlock level))
where
ordered_prefix = error "ordered_prefix"
-- regex equivalent: [0-9]+[.)]\s?
ordered_prefix = (some digitChar) *> (char '.' <|> char ')') *> optional spaceChar
-- not exhaustive but we know listBlock is returning a List
unwrap (List l) = l