aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-02 02:54:00 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-02 02:54:00 +0000
commit9b7ec2d366e48dd77befb6710b9b567e26a53084 (patch)
tree7db4d674dcf2cb6e828facb81fbe54c4a39be857
parent3d2ff3d0a8d6ee04e771d1261b1367d7a3f4efe3 (diff)
downloadpandoc-9b7ec2d366e48dd77befb6710b9b567e26a53084.tar.gz
Modified Text.Pandoc.Biblio to fit new citeproc API.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1416 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--Text/Pandoc/Biblio.hs10
1 files changed, 5 insertions, 5 deletions
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