diff options
Diffstat (limited to 'src/Text/Pandoc/App/OutputSettings.hs')
| -rw-r--r-- | src/Text/Pandoc/App/OutputSettings.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs index 5851d433c..20321f52a 100644 --- a/src/Text/Pandoc/App/OutputSettings.hs +++ b/src/Text/Pandoc/App/OutputSettings.hs @@ -102,17 +102,18 @@ optToOutputSettings scriptingEngine opts = do ByteStringWriter w -> ByteStringWriter $ \o d -> sandbox files (w o d) - Format.FlavoredFormat format _extsDiff <- Format.parseFlavoredFormat writerName + flvrd@(Format.FlavoredFormat format _extsDiff) <- + Format.parseFlavoredFormat writerName (writer, writerExts) <- if "lua" `T.isSuffixOf` format then do (, mempty) <$> engineWriteCustom scriptingEngine (T.unpack format) else do if optSandbox opts - then case runPure (getWriter writerName) of + then case runPure (getWriter flvrd) of Right (w, wexts) -> return (makeSandboxed w, wexts) Left e -> throwError e - else getWriter writerName + else getWriter flvrd let standalone = optStandalone opts || not (isTextFormat format) || pdfOutput |
