diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-11-06 15:41:30 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-11-06 15:42:41 -0800 |
commit | e299212bf766cdbeec43be90f634038ab4a727c1 (patch) | |
tree | ddf01436166c6bd313719a8009eb2639108e360f /src/Text/Pandoc/App.hs | |
parent | adad3c70b6d68563f2dad5136705fcaa33d719ea (diff) | |
download | pandoc-e299212bf766cdbeec43be90f634038ab4a727c1.tar.gz |
Add and apply filters in order (not reversed).
This changes `applyFilters` from Text.Pandoc.Filter so
that it does a left fold rather than a right fold, applying
the filters in the order listed. [behavior change]
The command-line arguments are accumulated in order instead
of reverse order.
A first step twoards #5881.
Diffstat (limited to 'src/Text/Pandoc/App.hs')
-rw-r--r-- | src/Text/Pandoc/App.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index db9d029ac..79346855f 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -85,8 +85,7 @@ convertWithOpts opts = do (optMetadata opts)) && optCiteMethod opts `notElem` [Natbib, Biblatex] && all (not . isPandocCiteproc) filters - let filters' = if needsCiteproc then JSONFilter "pandoc-citeproc" : filters - else filters + let filters' = filters ++ [ JSONFilter "pandoc-citeproc" | needsCiteproc ] let sources = case optInputFiles opts of [] -> ["-"] |