summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-10-13 11:33:33 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-10-13 11:33:33 -0700
commit9a77a3f15ba4201a0b617a814b73d2eb9cad11fc (patch)
tree13e4e8383ab462e6a70e98c4256386e294991e57
parentea8b8114e125bb0237a58b3e70e7fba59436ed24 (diff)
Biblio: Make processBiblio take a Maybe Style parameter.
If Nothing, then nothing is done.
-rw-r--r--src/Text/Pandoc/Biblio.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Biblio.hs b/src/Text/Pandoc/Biblio.hs
index 596032087..934b9222e 100644
--- a/src/Text/Pandoc/Biblio.hs
+++ b/src/Text/Pandoc/Biblio.hs
@@ -43,9 +43,10 @@ import Control.Monad.State
-- | Process a 'Pandoc' document by adding citations formatted
-- according to a CSL style, using 'citeproc' from citeproc-hs.
-processBiblio :: Style -> [Reference] -> Pandoc -> Pandoc
-processBiblio _ [] p = p
-processBiblio style r p =
+processBiblio :: Maybe Style -> [Reference] -> Pandoc -> Pandoc
+processBiblio Nothing _ p = p
+processBiblio _ [] p = p
+processBiblio (Just style) r p =
let p' = evalState (bottomUpM setHash p) 1
grps = queryWith getCitation p'
result = citeproc procOpts style r (setNearNote style $