aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-02-12 01:40:55 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-02-12 01:40:55 +0300
commit30cd636c21d70ce07ffa03d6c0b452fa569724cb (patch)
tree651e5537974b6415e87e268ec6d63235f1f86721 /src/Text/Pandoc
parent450a200637fe2983a620033fe0493ae6cb8b2e18 (diff)
downloadpandoc-30cd636c21d70ce07ffa03d6c0b452fa569724cb.tar.gz
Muse reader: replace optionMaybe with optional
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs10
1 files changed, 5 insertions, 5 deletions
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)
--