diff options
| author | Albert Krewinkel <albert@zeitkraut.de> | 2022-09-29 13:59:34 +0200 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-09-30 08:33:40 -0700 |
| commit | 78814f27e07e2b9953ac1aba7f9646c3dca15a13 (patch) | |
| tree | 61b721fd7c6a89fd0b690daa39f2391a2fa6a20d /test/Tests | |
| parent | 4d365ca3ff740c5f574271a86c164d8c04daa83d (diff) | |
[API Change] Filter: Parameterize `applyFilters` over scripting engine.
Pass the scripting engine as a parameter so it can be swapped out.
Diffstat (limited to 'test/Tests')
| -rw-r--r-- | test/Tests/Lua.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs index 0a6db0131..6f544ccd4 100644 --- a/test/Tests/Lua.hs +++ b/test/Tests/Lua.hs @@ -28,8 +28,7 @@ import Text.Pandoc.Class (runIOorExplode, setUserDataDir) import Text.Pandoc.Definition (Attr, Block (BlockQuote, Div, Para), Pandoc, Inline (Emph, Str), pandocTypesVersion) import Text.Pandoc.Error (PandocError (PandocLuaError)) -import Text.Pandoc.Filter (Filter (LuaFilter), applyFilters) -import Text.Pandoc.Lua (Global (..), runLua, setGlobals) +import Text.Pandoc.Lua (Global (..), applyFilter, runLua, setGlobals) import Text.Pandoc.Options (def) import Text.Pandoc.Shared (pandocVersionText) @@ -234,7 +233,7 @@ assertFilterConversion :: String -> FilePath -> Pandoc -> Pandoc -> Assertion assertFilterConversion msg filterPath docIn expectedDoc = do actualDoc <- runIOorExplode $ do setUserDataDir (Just "../data") - applyFilters def [LuaFilter ("lua" </> filterPath)] ["HTML"] docIn + applyFilter def ["HTML"] ("lua" </> filterPath) docIn assertEqual msg expectedDoc actualDoc runLuaTest :: HasCallStack => Lua.LuaE PandocError a -> IO a |
