aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-12-13 21:15:41 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2017-12-13 21:15:41 +0100
commit4c64af4407776e6ceb2fcc8a803b83568b4c1964 (patch)
tree4903cad8f3892a41133f62dd5a36f477aaf7ca7f /src/Text/Pandoc/App.hs
parentf9d0e1c89cf8deca97a005d8cd6d2d601e422e24 (diff)
downloadpandoc-4c64af4407776e6ceb2fcc8a803b83568b4c1964.tar.gz
Custom writer: use init file to setup Lua interpreter
The same init file (`data/init`) that is used to setup the Lua interpreter for Lua filters is also used to setup the interpreter of custom writers.lua.
Diffstat (limited to 'src/Text/Pandoc/App.hs')
-rw-r--r--src/Text/Pandoc/App.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index f7d6450cc..e70b606a9 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -223,7 +223,7 @@ convertWithOpts opts = do
if ".lua" `isSuffixOf` format
-- note: use non-lowercased version writerName
then return (TextWriter
- (\o d -> liftIO $ writeCustom writerName o d)
+ (\o d -> writeCustom writerName o d)
:: Writer PandocIO, mempty)
else case getWriter writerName of
Left e -> E.throwIO $ PandocAppError $
@@ -846,7 +846,7 @@ applyLuaFilters :: Maybe FilePath -> [FilePath] -> String -> Pandoc
applyLuaFilters mbDatadir filters format d = do
expandedFilters <- mapM (expandFilterPath mbDatadir) filters
let go f d' = do
- res <- runLuaFilter mbDatadir f format d'
+ res <- runLuaFilter f format d'
case res of
Right x -> return x
Left (LuaException s) -> E.throw (PandocFilterError f s)