diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/App.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index fe3f37db8..aabefc64a 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -241,13 +241,13 @@ convertWithOpts opts = do "all" -> id "none" -> (filterIpynbOutput Nothing :) "best" -> (filterIpynbOutput (Just $ - if htmlFormat writerName + if htmlFormat format then Format "html" else - case writerName of + case format of "latex" -> Format "latex" "beamer" -> Format "latex" - _ -> Format writerName) :) + _ -> Format format) :) _ -> id) -- should not happen $ [] @@ -299,7 +299,7 @@ convertWithOpts opts = do else (<> T.singleton '\n') output <- addNl <$> f writerOptions doc writerFn eol outputFile =<< - if optSelfContained opts && htmlFormat writerName + if optSelfContained opts && htmlFormat format -- TODO not maximally efficient; change type -- of makeSelfContained so it works w/ Text then T.pack <$> makeSelfContained (T.unpack output) |