diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/App.hs | 6 | ||||
| -rw-r--r-- | src/Text/Pandoc/Scripting.hs | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index b4a9454e5..1290fc1c5 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -165,7 +165,11 @@ convertWithOpts' scriptingEngine istty datadir opts = do (reader, readerExts) <- if ".lua" `T.isSuffixOf` readerName - then (,mempty) <$> engineReadCustom scriptingEngine (T.unpack readerName) + then do + let scriptPath = T.unpack readerNameBase + (r, extsConf) <- engineReadCustom scriptingEngine scriptPath + rexts <- Format.applyExtensionsDiff extsConf flvrd + return (r, rexts) else if optSandbox opts then case runPure (getReader flvrd) of Left e -> throwError e diff --git a/src/Text/Pandoc/Scripting.hs b/src/Text/Pandoc/Scripting.hs index 0defa2f77..d4be7e377 100644 --- a/src/Text/Pandoc/Scripting.hs +++ b/src/Text/Pandoc/Scripting.hs @@ -36,7 +36,7 @@ data ScriptingEngine = ScriptingEngine -- ^ Use the scripting engine to run a filter. , engineReadCustom :: forall m. (PandocMonad m, MonadIO m) - => FilePath -> m (Reader m) + => FilePath -> m (Reader m, ExtensionsConfig) -- ^ Function to parse input into a 'Pandoc' document. , engineWriteCustom :: forall m. (PandocMonad m, MonadIO m) |
