aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Lua.hs')
-rw-r--r--src/Text/Pandoc/Lua.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Lua.hs b/src/Text/Pandoc/Lua.hs
index 2860b84df..ab3b5f4ca 100644
--- a/src/Text/Pandoc/Lua.hs
+++ b/src/Text/Pandoc/Lua.hs
@@ -51,14 +51,14 @@ import qualified Data.Map as Map
import qualified Foreign.Lua as Lua
runLuaFilter :: (MonadIO m)
- => Maybe FilePath -> FilePath -> [String] -> Pandoc -> m Pandoc
-runLuaFilter datadir filterPath args pd = liftIO . Lua.runLua $ do
+ => Maybe FilePath -> FilePath -> String -> Pandoc -> m Pandoc
+runLuaFilter datadir filterPath format pd = liftIO . Lua.runLua $ do
Lua.openlibs
-- store module in global "pandoc"
pushPandocModule datadir
Lua.setglobal "pandoc"
- push args
- Lua.setglobal "arg"
+ push format
+ Lua.setglobal "FORMAT"
top <- Lua.gettop
stat <- Lua.dofile filterPath
if stat /= OK