aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers/Org')
-rw-r--r--src/Text/Pandoc/Readers/Org/Meta.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Meta.hs b/src/Text/Pandoc/Readers/Org/Meta.hs
index 71fac6db3..fc733a777 100644
--- a/src/Text/Pandoc/Readers/Org/Meta.hs
+++ b/src/Text/Pandoc/Readers/Org/Meta.hs
@@ -265,7 +265,7 @@ macroDefinition = try $ do
return (macroName, expander)
where
placeholder :: Monad m => OrgParser m Int
- placeholder = try . fmap read $ char '$' *> many1 digit
+ placeholder = try . fmap (fromMaybe 1 . safeRead) $ char '$' *> many1 digit
expansionPart :: Monad m => OrgParser m String
expansionPart = try $ many (notFollowedBy placeholder *> noneOf "\n\r")