diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-29 17:13:19 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-29 17:13:19 +0200 |
commit | 5e00cf8086e0960e81c31f7cd981ace646623f09 (patch) | |
tree | a2cffda0c28e112169bcdd4056098a4ee8d40299 /src/Text/Pandoc/App.hs | |
parent | 0f658eb46ce3630886b733e8c8ed1086af9b3510 (diff) | |
download | pandoc-5e00cf8086e0960e81c31f7cd981ace646623f09.tar.gz |
Added parameter for user data directory to runLuaFilter.
in Text.Pandoc.Lua. Also to pushPandocModule.
This change allows users to override pandoc.lua with a file
in their local data directory, adding custom functions, etc.
@tarleb, if you think this is a bad idea, you can revert this.
But in general our data files are all overridable.
Diffstat (limited to 'src/Text/Pandoc/App.hs')
-rw-r--r-- | src/Text/Pandoc/App.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index ee74d39c0..c119fa255 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -795,7 +795,7 @@ applyLuaFilters :: MonadIO m applyLuaFilters mbDatadir filters args d = do expandedFilters <- mapM (expandFilterPath mbDatadir) filters let go f d' = liftIO $ do - res <- E.try (runLuaFilter f args d') + res <- E.try (runLuaFilter mbDatadir f args d') case res of Right x -> return x Left (LuaException s) -> E.throw (PandocFilterError f s) |