aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App/CommandLineOptions.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2022-12-06 08:56:06 +0100
committerAlbert Krewinkel <[email protected]>2022-12-06 11:17:32 +0100
commitab4d712a9bdcb312481c42bd68bd1410e5168afd (patch)
treed5b0ea0a1c0f43220f1f89df1a6e8ca286379f3b /src/Text/Pandoc/App/CommandLineOptions.hs
parent5db482fefbd4e8f62dc43d795d4d4feada43f7fd (diff)
fixup! T.P.Scripting: add CustomComponents, and change...issue8417
Diffstat (limited to 'src/Text/Pandoc/App/CommandLineOptions.hs')
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index a65fe5a04..30b5693fd 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -51,7 +51,7 @@ import Text.Pandoc.App.Opt (Opt (..), LineEnding (..), IpynbOutput (..),
fullDefaultsPath, OptInfo(..))
import Text.Pandoc.Filter (Filter (..))
import Text.Pandoc.Highlighting (highlightingStyles, lookupHighlightingStyle)
-import Text.Pandoc.Scripting (ScriptingEngine (..))
+import Text.Pandoc.Scripting (ScriptingEngine (..), customTemplate)
import Text.Pandoc.Shared (safeStrRead)
import Text.Printf
import qualified Control.Exception as E
@@ -161,8 +161,8 @@ handleOptInfo engine info = E.handle (handleError . Left) $ do
getDefaultTemplate fmt
_ -> do
-- format looks like a filepath => custom writer
- (_, _, mt) <- engineWriteCustom engine (T.unpack fmt)
- case mt of
+ components <- engineLoadCustom engine (T.unpack fmt)
+ case customTemplate components of
Just t -> pure t
Nothing -> E.throw $ PandocNoTemplateError fmt
case templ of