Muse reader: rewrite museOrderedListMarker without "do"
This commit is contained in:
parent
51e8a79023
commit
d6b8d7feb8
1 changed files with 9 additions and 10 deletions
|
@ -563,16 +563,15 @@ anyMuseOrderedListMarker = do
|
|||
museOrderedListMarker :: PandocMonad m
|
||||
=> ListNumberStyle
|
||||
-> MuseParser m Int
|
||||
museOrderedListMarker style = do
|
||||
(_, start) <- case style of
|
||||
Decimal -> decimal
|
||||
UpperRoman -> upperRoman
|
||||
LowerRoman -> lowerRoman
|
||||
UpperAlpha -> upperAlpha
|
||||
LowerAlpha -> lowerAlpha
|
||||
_ -> fail "Unhandled case"
|
||||
char '.'
|
||||
return start
|
||||
museOrderedListMarker style =
|
||||
snd <$> p <* char '.'
|
||||
where p = case style of
|
||||
Decimal -> decimal
|
||||
UpperRoman -> upperRoman
|
||||
LowerRoman -> lowerRoman
|
||||
UpperAlpha -> upperAlpha
|
||||
LowerAlpha -> lowerAlpha
|
||||
_ -> fail "Unhandled case"
|
||||
|
||||
orderedListItemsUntil :: PandocMonad m
|
||||
=> Int
|
||||
|
|
Loading…
Reference in a new issue