From 358e8c28976276afb1601d308a3cad568494983c Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 29 Sep 2017 21:05:24 +0200 Subject: Run Lua filters before extracting media This enables users to change the media files being extracted via lua filters. --- src/Text/Pandoc/App.hs | 4 ++-- 1 file 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 -- cgit v1.2.3