From 30cd636c21d70ce07ffa03d6c0b452fa569724cb Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 12 Feb 2018 01:40:55 +0300 Subject: Muse reader: replace optionMaybe with optional --- src/Text/Pandoc/Readers/Muse.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Text/Pandoc/Readers/Muse.hs') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 147b0731b..5b4781ec0 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -295,7 +295,7 @@ blockElements = choice [ mempty <$ blankline comment :: PandocMonad m => MuseParser m (F Blocks) comment = try $ do char ';' - optionMaybe (spaceChar >> many (noneOf "\n")) + optional (spaceChar >> many (noneOf "\n")) eol return mempty @@ -323,8 +323,8 @@ header = try $ do example :: PandocMonad m => MuseParser m (F Blocks) example = try $ do string "{{{" - optionMaybe blankline - contents <- manyTill anyChar $ try (optionMaybe blankline >> string "}}}") + optional blankline + contents <- manyTill anyChar $ try (optional blankline >> string "}}}") return $ return $ B.codeBlock contents -- Trim up to one newline from the beginning and the end, @@ -502,7 +502,7 @@ listItemContents = do listItem :: PandocMonad m => Int -> MuseParser m a -> MuseParser m (F Blocks) listItem n p = try $ do - optionMaybe blankline + optional blankline count n spaceChar p void spaceChar <|> lookAhead eol @@ -571,7 +571,7 @@ definitionList = try $ do pos <- getPosition guardDisabled Ext_amuse <|> guard (sourceColumn pos /= 1) -- Initial space is required by Amusewiki, but not Emacs Muse first <- definitionListItem 0 - rest <- many $ try (optionMaybe blankline >> definitionListItem (sourceColumn pos - 1)) + rest <- many $ try (optional blankline >> definitionListItem (sourceColumn pos - 1)) return $ B.definitionList <$> sequence (first : rest) -- -- cgit v1.2.3