mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-23 07:55:45 +00:00
Biblio: If locator ends with ",", add it to the suffix.
This commit is contained in:
@@ -174,10 +174,18 @@ toCslCite c
|
||||
|
||||
locatorWords :: [Inline] -> (String, [Inline])
|
||||
locatorWords inp =
|
||||
case parse (liftM2 (,) pLocator getInput) "suffix" inp of
|
||||
case parse pLocatorWords "suffix" inp of
|
||||
Right r -> r
|
||||
Left _ -> ("",inp)
|
||||
|
||||
pLocatorWords :: GenParser Inline st (String, [Inline])
|
||||
pLocatorWords = do
|
||||
l <- pLocator
|
||||
s <- getInput -- rest is suffix
|
||||
if length l > 0 && last l == ','
|
||||
then return (init l, Str "," : s)
|
||||
else return (l, s)
|
||||
|
||||
pMatch :: (Inline -> Bool) -> GenParser Inline st Inline
|
||||
pMatch condition = try $ do
|
||||
t <- anyToken
|
||||
|
||||
Reference in New Issue
Block a user