diff options
-rw-r--r-- | src/Text/Pandoc/Lua.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Lua.hs b/src/Text/Pandoc/Lua.hs index 477076191..2860b84df 100644 --- a/src/Text/Pandoc/Lua.hs +++ b/src/Text/Pandoc/Lua.hs @@ -57,6 +57,8 @@ runLuaFilter datadir filterPath args pd = liftIO . Lua.runLua $ do -- store module in global "pandoc" pushPandocModule datadir Lua.setglobal "pandoc" + push args + Lua.setglobal "arg" top <- Lua.gettop stat <- Lua.dofile filterPath if stat /= OK @@ -68,8 +70,6 @@ runLuaFilter datadir filterPath args pd = liftIO . Lua.runLua $ do -- Use the implicitly defined global filter if nothing was returned when (newtop - top < 1) pushGlobalFilter luaFilters <- peek (-1) - push args - Lua.setglobal "PandocParameters" runAll luaFilters pd pushGlobalFilter :: Lua () |