diff options
| author | Albert Krewinkel <[email protected]> | 2022-12-06 08:56:06 +0100 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2022-12-06 11:17:32 +0100 |
| commit | ab4d712a9bdcb312481c42bd68bd1410e5168afd (patch) | |
| tree | d5b0ea0a1c0f43220f1f89df1a6e8ca286379f3b /src/Text/Pandoc | |
| parent | 5db482fefbd4e8f62dc43d795d4d4feada43f7fd (diff) | |
fixup! T.P.Scripting: add CustomComponents, and change...issue8417
Diffstat (limited to 'src/Text/Pandoc')
| -rw-r--r-- | src/Text/Pandoc/App/CommandLineOptions.hs | 6 |
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 |
