diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 22f703e7d..158b23ffc 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -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 |