aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Ipynb.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/Ipynb.hs b/src/Text/Pandoc/Readers/Ipynb.hs
index dc2c61f56..dbb58fbe5 100644
--- a/src/Text/Pandoc/Readers/Ipynb.hs
+++ b/src/Text/Pandoc/Readers/Ipynb.hs
@@ -97,12 +97,16 @@ cellToBlocks opts lang c = do
let format = fromMaybe "ipynb" $ lookup "format" kvs
let format' =
case format of
- "text/html" -> "html"
- "text/latex" -> "latex"
- "application/pdf" -> "latex"
- "text/markdown" -> "markdown"
- "text/x-rst" -> "rst"
- _ -> format
+ "text/html" -> "html"
+ "slides" -> "html"
+ "text/latex" -> "latex"
+ "application/pdf" -> "latex"
+ "pdf" -> "latex"
+ "text/markdown" -> "markdown"
+ "text/x-rst" -> "rst"
+ "text/restructuredtext" -> "rst"
+ "text/asciidoc" -> "asciidoc"
+ _ -> format
return $ B.divWith ("",["cell","raw"],kvs) $ B.rawBlock format' source
Ipynb.Code{ codeOutputs = outputs, codeExecutionCount = ec } -> do
outputBlocks <- mconcat <$> mapM outputToBlock outputs