summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Citeproc/Locator.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Citeproc/Locator.hs b/src/Text/Pandoc/Citeproc/Locator.hs
index 35d5388b0..9e5daf0c5 100644
--- a/src/Text/Pandoc/Citeproc/Locator.hs
+++ b/src/Text/Pandoc/Citeproc/Locator.hs
@@ -80,9 +80,9 @@ pLocatorDelimited locMap = try $ do
pLocatorLabelDelimited :: LocatorMap -> LocatorParser (Text, Text, Bool)
pLocatorLabelDelimited locMap
- = pLocatorLabel' locMap lim <|> return ("", "page", True)
- where
- lim = stringify <$> anyToken
+ = pLocatorLabel' locMap (stringify <$> anyToken)
+ <|> (("", "page", True) <$ lookAhead (pMatchChar "digit" isDigit))
+ <|> (pure ("", "", True))
pLocatorIntegrated :: LocatorMap -> LocatorParser LocatorInfo
pLocatorIntegrated locMap = try $ do