aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-12-27 10:36:39 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-12-27 10:37:01 -0800
commitb8bd845542d76dfd6915208c3ab48d3a72587738 (patch)
tree0478c1eeed7d64aba91a576688bc12f0cc460a66 /src/Text/Pandoc
parent1ff732269ecb435ea1eac77ad3df81624be4e605 (diff)
downloadpandoc-b8bd845542d76dfd6915208c3ab48d3a72587738.tar.gz
Add a needed try.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index e46396fa0..9f63a1947 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -618,7 +618,7 @@ rawAttribute = do
char '{'
skipMany spaceChar
char '='
- format <- many1Char $ satisfy (\c -> isAlphaNum c || c `elem` ['-', '_'])
+ format <- many1Char $ satisfy (\c -> isAlphaNum c || c `elem` ['-', '_'])
skipMany spaceChar
char '}'
return format
@@ -1095,7 +1095,8 @@ rawHtmlBlocks = do
oldInHtmlBlock <- stateInHtmlBlock <$> getState
updateState $ \st -> st{ stateInHtmlBlock = Just tagtype }
let closer = htmlTag (\x -> x ~== TagClose tagtype)
- let block' = do notFollowedBy' closer
+ let block' = try $
+ do notFollowedBy' closer
gobbleAtMostSpaces indentlevel
block
contents <- mconcat <$> many block'