From 9a77a3f15ba4201a0b617a814b73d2eb9cad11fc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 13 Oct 2012 11:33:33 -0700 Subject: Biblio: Make processBiblio take a Maybe Style parameter. If Nothing, then nothing is done. --- src/Text/Pandoc/Biblio.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Text') 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 $ -- cgit v1.2.3