summaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-05-11 21:31:03 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-05-11 21:31:03 -0700
commita131441da471fa80523c957cd8193af37de6769c (patch)
tree49c75ada6e687c338a7cd5ac4bc07c80427dc92c /pandoc.hs
parentc6debff1f898b0fd6a36efe8397dbfd18b84cacf (diff)
Only make implicit `-F pandoc-citeproc` when `--bibliography` option used.
Not when `bibliography` field in metadata is specified. Closes #1849.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 949bb17d2..b90e8a09d 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -58,7 +58,7 @@ import qualified Control.Exception as E
import Control.Exception.Extensible ( throwIO )
import qualified Text.Pandoc.UTF8 as UTF8
import Control.Monad (when, unless, (>=>))
-import Data.Maybe (isJust, fromMaybe)
+import Data.Maybe (fromMaybe)
import Data.Foldable (foldrM)
import Network.URI (parseURI, isURI, URI(..))
import qualified Data.ByteString.Lazy as B
@@ -1117,7 +1117,7 @@ main = do
-- --bibliography implies -F pandoc-citeproc for backwards compatibility:
- let needsCiteproc = isJust (M.lookup "bibliography" metadata) &&
+ let needsCiteproc = any ("--bibliography" `isPrefixOf`) rawArgs &&
optCiteMethod opts `notElem` [Natbib, Biblatex] &&
"pandoc-citeproc" `notElem` map takeBaseName filters
let filters' = if needsCiteproc then "pandoc-citeproc" : filters