aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Parsing.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index 08769a4f4..0468ceec5 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -342,10 +342,10 @@ escaped parser = try $ char '\\' >> parser
characterReference :: GenParser Char st Char
characterReference = try $ do
char '&'
- ent <- manyTill nonspaceChar (char ';')
+ ent <- many1Till nonspaceChar (char ';')
case lookupEntity ent of
Just c -> return c
- Nothing -> return '?'
+ Nothing -> fail "entity not found"
-- | Parses an uppercase roman numeral and returns (UpperRoman, number).
upperRoman :: GenParser Char st (ListNumberStyle, Int)