summaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-11-16 09:46:11 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-11-16 09:46:11 -0800
commite44149931ef8db3b42614e47a316d3ba27d1e337 (patch)
treee9cbb08f164c1241c2b2b9a77f7e3278ff23a808 /pandoc.hs
parenta081df1c41f2acb900e60ce9f12d52179199d3ea (diff)
Improved implicit pandoc-citeproc inclusion.
The filter pandoc-citeproc is automatically used when `--bibliography` is specified on the command line, unless `--natbib` or `--biblatex` is used. However, previously this only worked if `--bibliography` was spelled out in full, and not if `--biblio` was used. This patch fixes that problem.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/pandoc.hs b/pandoc.hs
index fce1a8142..6900c34b7 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -1139,7 +1139,7 @@ main = do
-- --bibliography implies -F pandoc-citeproc for backwards compatibility:
- let needsCiteproc = any ("--bibliography" `isPrefixOf`) rawArgs &&
+ let needsCiteproc = M.lookup "bibliography" (optMetadata opts) /= Nothing &&
optCiteMethod opts `notElem` [Natbib, Biblatex] &&
"pandoc-citeproc" `notElem` map takeBaseName filters
let filters' = if needsCiteproc then "pandoc-citeproc" : filters