mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
Citeproc: Require a digit for an implicit "page" locator...
inside explicit locator syntax `{...}`.
Previously a locator specified as `{}` would be rendered
as `p.` with nothing after it.
Closes #8288.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -100,7 +100,7 @@ Unbalanced curly } ends early[^18]
|
||||
|
||||
[^6]: Subsequent, p. {(a)}.
|
||||
|
||||
[^7]: Ibid-with-locator.
|
||||
[^7]: Ibid.
|
||||
|
||||
[^8]: Ibid 123-35 numbers are suffix.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user