Minor changes in Text.Pandoc.Biblio.
Replaced queryPandoc w queryWith, processPandoc w processWith. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1554 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
29d2952a10
commit
9be0d098b8
1 changed files with 3 additions and 3 deletions
|
@ -42,11 +42,11 @@ processBiblio cf r p
|
|||
else do
|
||||
when (null cf) $ error "Missing the needed citation style file"
|
||||
csl <- readCSLFile cf
|
||||
let groups = queryPandoc getCite p
|
||||
let groups = queryWith getCite p
|
||||
result = citeproc csl r groups
|
||||
cits_map = zip groups (citations result)
|
||||
biblioList = map (read . renderPandoc' csl) (bibliography result)
|
||||
Pandoc m b = processPandoc (processCite csl cits_map) p
|
||||
Pandoc m b = processWith (processCite csl cits_map) p
|
||||
return $ Pandoc m $ b ++ biblioList
|
||||
|
||||
-- | Substitute 'Cite' elements with formatted citations.
|
||||
|
@ -60,7 +60,7 @@ processCite s cs il
|
|||
Nothing -> [Str ("Error processing " ++ show t)]
|
||||
|
||||
-- | Retrieve all citations from a 'Pandoc' docuument. To be used with
|
||||
-- 'queryPandoc'.
|
||||
-- 'queryWith'.
|
||||
getCite :: Inline -> [[(String,String)]]
|
||||
getCite i | Cite t _ <- i = [t]
|
||||
| otherwise = []
|
||||
|
|
Loading…
Add table
Reference in a new issue