aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-11-18 14:15:26 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-11-18 14:15:26 -0800
commitbbb60a2586f29785fd9ba592770bc2f7842deba4 (patch)
tree6db08b5683352116a6ae033cc8fc58014ddd4a00 /src/Text/Pandoc
parent482b4b8d738aab1e0fed7ad1bb4702c567438dde (diff)
downloadpandoc-bbb60a2586f29785fd9ba592770bc2f7842deba4.tar.gz
If --csl not specified, read from data files or default.
Thus --csl behaves like --reference-odt, --template, etc.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Biblio.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Biblio.hs b/src/Text/Pandoc/Biblio.hs
index dde822da8..12911e1ee 100644
--- a/src/Text/Pandoc/Biblio.hs
+++ b/src/Text/Pandoc/Biblio.hs
@@ -29,7 +29,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
module Text.Pandoc.Biblio ( processBiblio ) where
-import Control.Monad ( when )
import Data.List
import Data.Unique
import qualified Data.Map as M
@@ -39,12 +38,10 @@ import Text.Pandoc.Definition
-- | Process a 'Pandoc' document by adding citations formatted
-- according to a CSL style, using 'citeproc' from citeproc-hs.
-processBiblio :: String -> [Reference] -> Pandoc -> IO Pandoc
-processBiblio cf r p
+processBiblio :: Style -> [Reference] -> Pandoc -> IO Pandoc
+processBiblio csl r p
= if null r then return p
else do
- when (null cf) $ error "Missing the needed citation style file"
- csl <- readCSLFile cf
p' <- processWithM setHash p
let (nts,grps) = if styleClass csl /= "note"
then (,) [] $ queryWith getCitation p'