git.iko.soy/typeable/pandoc
on master help sign in
Modified Text.Pandoc.Biblio to fit new citeproc API.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1416 788f1e2b-df1e-0410-8736-df70ead52e1b

commit9b7ec2d366e48dd77befb6710b9b567e26a53084 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 2 Sep 2008, 02:54 (18 years ago) parent3d2ff3d
1 file changed+5−5
Text/Pandoc/Biblio.hs+5−5
Text/Pandoc/Biblio.hs+5−5
@@ -45,18 +45,18 @@ processBiblio cf r p
4545 let groups = queryPandoc getCite p
4646 result = citeproc csl r groups
4747 cits_map = zip groups (citations result)
48− biblioList = map (read . renderPandoc') (bibliography result)
49− Pandoc m b = processPandoc (processCite cits_map) p
48+ biblioList = map (read . renderPandoc' csl) (bibliography result)
49+ Pandoc m b = processPandoc (processCite csl cits_map) p
5050 return $ Pandoc m $ b ++ biblioList
5151
5252-- | Substitute 'Cite' elements with formatted citations.
53−processCite :: [([Target],[FormattedOutput])] -> Inline -> Inline
54−processCite cs il
53+processCite :: Style -> [([Target],[FormattedOutput])] -> Inline -> Inline
54+processCite s cs il
5555 | Cite t _ <- il = Cite t (process t)
5656 | otherwise = il
5757 where
5858 process t = case elemIndex t (map fst cs) of
59− Just i -> read . renderPandoc $ snd (cs !! i)
59+ Just i -> read . renderPandoc s $ snd (cs !! i)
6060 Nothing -> [Str ("Error processing " ++ show t)]
6161
6262-- | Retrieve all citations from a 'Pandoc' docuument. To be used with