diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-10-13 11:33:33 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-10-13 11:33:33 -0700 |
commit | 9a77a3f15ba4201a0b617a814b73d2eb9cad11fc (patch) | |
tree | 13e4e8383ab462e6a70e98c4256386e294991e57 /src | |
parent | ea8b8114e125bb0237a58b3e70e7fba59436ed24 (diff) | |
download | pandoc-9a77a3f15ba4201a0b617a814b73d2eb9cad11fc.tar.gz |
Biblio: Make processBiblio take a Maybe Style parameter.
If Nothing, then nothing is done.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Biblio.hs | 7 |
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 $ |