aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-09-29 21:05:24 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-09-30 09:57:03 +0200
commit358e8c28976276afb1601d308a3cad568494983c (patch)
tree87e5d00aec05dca932872aee81bf29222af4f69f
parent2f47e04206a3869eadc5c93076e0b50d4362f9df (diff)
downloadpandoc-358e8c28976276afb1601d308a3cad568494983c.tar.gz
Run Lua filters before extracting media
This enables users to change the media files being extracted via lua filters.
-rw-r--r--src/Text/Pandoc/App.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 82c40f5a4..9b3055b35 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -511,10 +511,10 @@ convertWithOpts opts = do
( (if isJust (optExtractMedia opts)
then fillMediaBag (writerSourceURL writerOptions)
else return)
- >=> maybe return extractMedia (optExtractMedia opts)
>=> return . flip (foldr addMetadata) metadata
- >=> applyTransforms transforms
>=> applyLuaFilters datadir (optLuaFilters opts) format
+ >=> maybe return extractMedia (optExtractMedia opts)
+ >=> applyTransforms transforms
>=> applyFilters readerOpts datadir filters' [format]
)
media <- getMediaBag