From 9b7ec2d366e48dd77befb6710b9b567e26a53084 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 2 Sep 2008 02:54:00 +0000 Subject: Modified Text.Pandoc.Biblio to fit new citeproc API. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1416 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Biblio.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Text') diff --git a/Text/Pandoc/Biblio.hs b/Text/Pandoc/Biblio.hs index 0e6fa1908..1d93f19c1 100644 --- a/Text/Pandoc/Biblio.hs +++ b/Text/Pandoc/Biblio.hs @@ -45,18 +45,18 @@ processBiblio cf r p let groups = queryPandoc getCite p result = citeproc csl r groups cits_map = zip groups (citations result) - biblioList = map (read . renderPandoc') (bibliography result) - Pandoc m b = processPandoc (processCite cits_map) p + biblioList = map (read . renderPandoc' csl) (bibliography result) + Pandoc m b = processPandoc (processCite csl cits_map) p return $ Pandoc m $ b ++ biblioList -- | Substitute 'Cite' elements with formatted citations. -processCite :: [([Target],[FormattedOutput])] -> Inline -> Inline -processCite cs il +processCite :: Style -> [([Target],[FormattedOutput])] -> Inline -> Inline +processCite s cs il | Cite t _ <- il = Cite t (process t) | otherwise = il where process t = case elemIndex t (map fst cs) of - Just i -> read . renderPandoc $ snd (cs !! i) + Just i -> read . renderPandoc s $ snd (cs !! i) Nothing -> [Str ("Error processing " ++ show t)] -- | Retrieve all citations from a 'Pandoc' docuument. To be used with -- cgit v1.2.3