@@ -99,8 +99,8 @@ getNoteCitations needNote
99 in queryWith getCitation . getCits
99 in queryWith getCitation . getCits
101setHash :: Citation -> IO Citation
101setHash :: Citation -> IO Citation
102−setHash (Citation i p l cm nn _)
102+setHash (Citation i p s l cm nn _)
103− = hashUnique `fmap` newUnique >>= return . Citation i p l cm nn
103+ = hashUnique `fmap` newUnique >>= return . Citation i p s l cm nn
105generateNotes :: [Inline] -> Pandoc -> Pandoc
105generateNotes :: [Inline] -> Pandoc -> Pandoc
106generateNotes needNote = processWith (mvCiteInNote needNote)
106generateNotes needNote = processWith (mvCiteInNote needNote)
@@ -150,19 +150,30 @@ setCiteNoteNum _ _ = []
150setCitationNoteNum :: Int -> [Citation] -> [Citation]
150setCitationNoteNum :: Int -> [Citation] -> [Citation]
151setCitationNoteNum i = map $ \c -> c { citationNoteNum = i}
151setCitationNoteNum i = map $ \c -> c { citationNoteNum = i}
153+-- a temporary function to tide us over until citeproc is
154+-- changed to use Inline lists for prefixes and suffixes...
155+stringify :: [Inline] -> String
156+stringify = queryWith go
157+ where go :: Inline -> [Char]
153toCslCite :: Citation -> CSL.Cite
163toCslCite :: Citation -> CSL.Cite
154−toCslCite (Citation i p l cm nn h)
164+toCslCite c
155− = let (la,lo) = parseLocator l
165+ = let (la,lo) = parseLocator $ citationLocator c
156− citMode = case cm of
166+ citMode = case citationMode c of
157 AuthorInText -> (True, False)
167 AuthorInText -> (True, False)
158 SuppressAuthor -> (False,True )
168 SuppressAuthor -> (False,True )
159 NormalCitation -> (False,False)
169 NormalCitation -> (False,False)
160− in emptyCite { CSL.citeId = i
170+ in emptyCite { CSL.citeId = citationId c
161− , CSL.citePrefix = p
171+ , CSL.citePrefix = stringify $ citationPrefix c
172+ , CSL.citeSuffix = stringify $ citationSuffix c
162 , CSL.citeLabel = la
173 , CSL.citeLabel = la
163 , CSL.citeLocator = lo
174 , CSL.citeLocator = lo
164− , CSL.citeNoteNumber = show nn
175+ , CSL.citeNoteNumber = show $ citationNoteNum c
165 , CSL.authorInText = fst citMode
176 , CSL.authorInText = fst citMode
166 , CSL.suppressAuthor = snd citMode
177 , CSL.suppressAuthor = snd citMode
167− , CSL.citeHash = h
178+ , CSL.citeHash = citationHash c