ordered list prefix
This commit is contained in:
parent
628d85a8f3
commit
0acf1668c0
1 changed files with 2 additions and 1 deletions
|
|
@ -151,7 +151,8 @@ unorderedListBlock = listBlock Unordered unordered_prefix (\level -> unwrap <$>
|
||||||
orderedListBlock :: (Logger m, Characters s) => Int -> Parser s m Element
|
orderedListBlock :: (Logger m, Characters s) => Int -> Parser s m Element
|
||||||
orderedListBlock = listBlock Ordered ordered_prefix (\level -> unwrap <$> ((try $ unorderedListBlock level) <|> orderedListBlock level))
|
orderedListBlock = listBlock Ordered ordered_prefix (\level -> unwrap <$> ((try $ unorderedListBlock level) <|> orderedListBlock level))
|
||||||
where
|
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
|
-- not exhaustive but we know listBlock is returning a List
|
||||||
unwrap (List l) = l
|
unwrap (List l) = l
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue