aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander <ilabdsf@gmail.com>2017-08-23 09:12:34 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-22 23:12:34 -0700
commit5d74932578ddaa564eae88158bfb4c7f92dc7dd5 (patch)
treeb9213814558a55b4afaf08c1cdc91ab3d6ce5b5a /src/Text/Pandoc
parentc7d4fd8cf13adb905a8185a7d2fb359e06481184 (diff)
downloadpandoc-5d74932578ddaa564eae88158bfb4c7f92dc7dd5.tar.gz
Muse reader: avoid crashes on multiparagraph inline tags (#3866)
Test checks that behavior is consistent with Amusewiki
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index f64f9d04f..74622a639 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -129,7 +129,7 @@ parseHtmlContentWithAttrs :: PandocMonad m
=> String -> MuseParser m a -> MuseParser m (Attr, [a])
parseHtmlContentWithAttrs tag parser = do
(attr, content) <- htmlElement tag
- parsedContent <- try $ parseContent (content ++ "\n")
+ parsedContent <- parseContent (content ++ "\n")
return (attr, parsedContent)
where
parseContent = parseFromString $ nested $ manyTill parser endOfContent
@@ -536,7 +536,7 @@ inlineTag :: PandocMonad m
=> (Inlines -> Inlines)
-> String
-> MuseParser m (F Inlines)
-inlineTag f s = do
+inlineTag f s = try $ do
res <- parseHtmlContent s inline
return $ f <$> mconcat res