Don't add comma+space to prefix if it ends in punctuation.

Patch from Andrea Rossato.
This commit is contained in:
John MacFarlane 2011-11-04 17:38:18 -07:00
parent 195f9045a4
commit e8bfabeeeb

View file

@ -163,13 +163,9 @@ toCslCite c
AuthorInText -> (True, False) AuthorInText -> (True, False)
SuppressAuthor -> (False,True ) SuppressAuthor -> (False,True )
NormalCitation -> (False,False) NormalCitation -> (False,False)
s' = case s of
[] -> []
(Str (y:_) : _) | isPunctuation y -> s
_ -> Str "," : Space : s
in emptyCite { CSL.citeId = citationId c in emptyCite { CSL.citeId = citationId c
, CSL.citePrefix = PandocText $ citationPrefix c , CSL.citePrefix = PandocText $ citationPrefix c
, CSL.citeSuffix = PandocText $ s' , CSL.citeSuffix = PandocText $ s
, CSL.citeLabel = la , CSL.citeLabel = la
, CSL.citeLocator = lo , CSL.citeLocator = lo
, CSL.citeNoteNumber = show $ citationNoteNum c , CSL.citeNoteNumber = show $ citationNoteNum c