aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2023-04-16 13:49:56 +0200
committerAlbert Krewinkel <[email protected]>2023-04-16 13:53:54 +0200
commita249f75a301a759bd4d2e5f77f4046113c370497 (patch)
treecc23174ca0a1eaa9ae0454a954f9f48b1b6bd29f
parent604d777c03ad1bd8a7f9279a255b2a693fe8c18d (diff)
Lua: fix value of PANDOC_SCRIPT_FILE for custom readers & writers
The value did not hold the actual file path for scripts in the *custom* folder of the datadir. Fixes: #8781
-rw-r--r--pandoc-lua-engine/src/Text/Pandoc/Lua/Custom.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Custom.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Custom.hs
index 14029a1d4..0a2eb2edc 100644
--- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Custom.hs
+++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Custom.hs
@@ -36,7 +36,7 @@ loadCustom luaFile = do
luaFile' <- fromMaybe luaFile <$>
findFileWithDataFallback "custom" luaFile
either throw pure <=< runLuaWith luaState $ do
- let globals = [ PANDOC_SCRIPT_FILE luaFile ]
+ let globals = [ PANDOC_SCRIPT_FILE luaFile' ]
setGlobals globals
dofileTrace (Just luaFile') >>= \case
OK -> pure ()