diff options
author | Alexander <ilabdsf@gmail.com> | 2017-08-23 09:12:34 +0300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-22 23:12:34 -0700 |
commit | 5d74932578ddaa564eae88158bfb4c7f92dc7dd5 (patch) | |
tree | b9213814558a55b4afaf08c1cdc91ab3d6ce5b5a /src | |
parent | c7d4fd8cf13adb905a8185a7d2fb359e06481184 (diff) | |
download | pandoc-5d74932578ddaa564eae88158bfb4c7f92dc7dd5.tar.gz |
Muse reader: avoid crashes on multiparagraph inline tags (#3866)
Test checks that behavior is consistent with Amusewiki
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 4 |
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 |