@@ -119,12 +119,12 @@ toCslCite :: Citation -> CSL.Cite
119119toCslCite c
120120 = let (l, s) = locatorWords $ citationSuffix c
121121 (la,lo) = parseLocator l
122− s' = case (l,s,citationMode c) of
123− -- treat a bare locator as if it begins with comma
122+ s' = case (l,s) of
123+ -- treat a bare locator as if it begins with space
124124 -- so @item1 [blah] is like [@item1, blah]
125− ("",(x:_),AuthorInText) | not (isPunct x)
126− -> [Str ",",Space] ++ s
127− _ -> s
125+ ("",(x:_))
126+ | not (isPunct x) -> [Space] ++ s
127+ _ -> s
128128 isPunct (Str (x:_)) = isPunctuation x
129129 isPunct _ = False
130130 citMode = case citationMode c of
@@ -173,13 +173,21 @@ pLocator :: Parsec [Inline] st String
173173pLocator = try $ do
174174 optional $ pMatch (== Str ",")
175175 optional pSpace
176− f <- many1 (notFollowedBy pSpace >> anyToken)
176+ f <- (guardFollowingDigit >> return [Str "p"]) -- "page" the default
177+ <|> many1 (notFollowedBy pSpace >> anyToken)
177178 gs <- many1 pWordWithDigits
178179 return $ stringify f ++ (' ' : unwords gs)
179180
181+guardFollowingDigit :: Parsec [Inline] st ()
182+guardFollowingDigit = do
183+ t <- lookAhead anyToken
184+ case t of
185+ Str (d:_) | isDigit d -> return ()
186+ _ -> mzero
187+
180188pWordWithDigits :: Parsec [Inline] st String
181189pWordWithDigits = try $ do
182− pSpace
190+ optional pSpace
183191 r <- many1 (notFollowedBy pSpace >> anyToken)
184192 let s = stringify r
185193 guard $ any isDigit s