@@ -36,7 +36,6 @@ import Control.Monad ((>=>))
3636import Text.Pandoc.Class (PandocIO)
3737import Text.Pandoc.Definition (Pandoc)
3838import Text.Pandoc.Error (PandocError (PandocFilterError))
39−import Text.Pandoc.Filter.Path (expandFilterPath)
4039import Text.Pandoc.Lua (Global (..), LuaException (..),
4140 runLua, runFilterFile, setGlobals)
4241import Text.Pandoc.Options (ReaderOptions)
@@ -49,17 +48,16 @@ apply :: ReaderOptions
4948 -> FilePath
5049 -> Pandoc
5150 -> PandocIO Pandoc
52−apply ropts args f doc = do
53− filterPath <- expandFilterPath f
51+apply ropts args fp doc = do
5452 let format = case args of
5553 (x:_) -> x
5654 _ -> error "Format not supplied for Lua filter"
57− runLua >=> forceResult filterPath $ do
55+ runLua >=> forceResult fp $ do
5856 setGlobals [ FORMAT format
5957 , PANDOC_READER_OPTIONS ropts
60− , PANDOC_SCRIPT_FILE filterPath
58+ , PANDOC_SCRIPT_FILE fp
6159 ]
62− runFilterFile filterPath doc
60+ runFilterFile fp doc
6361
6462forceResult :: FilePath -> Either LuaException Pandoc -> PandocIO Pandoc
6563forceResult fp eitherResult = case eitherResult of