diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-04-17 10:04:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 10:04:39 -0700 |
commit | 906305de789c83f9fdcc2c7d30044acf97e89582 (patch) | |
tree | f359e991e60e7324f11e73a40259ed9dc3e4b91b /src/Text/Pandoc/Writers/Ipynb.hs | |
parent | f0f3cc14beeea51f703f7cfc8b40ebf3de2d0a05 (diff) | |
parent | d1521af8fb0d3e8ee4104224e4d5e0b6e6bfad8c (diff) | |
download | pandoc-906305de789c83f9fdcc2c7d30044acf97e89582.tar.gz |
Merge pull request #6224 from despresc/better-tables
Diffstat (limited to 'src/Text/Pandoc/Writers/Ipynb.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Ipynb.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Ipynb.hs b/src/Text/Pandoc/Writers/Ipynb.hs index 9355cc22f..d01d5a7e5 100644 --- a/src/Text/Pandoc/Writers/Ipynb.hs +++ b/src/Text/Pandoc/Writers/Ipynb.hs @@ -97,7 +97,7 @@ addAttachment (Image attr lab (src,tit)) return $ Image attr lab ("attachment:" <> src, tit) addAttachment x = return x -extractCells :: PandocMonad m => WriterOptions -> [Block] -> m [Cell a] +extractCells :: PandocMonad m => WriterOptions -> [Block] -> m [Ipynb.Cell a] extractCells _ [] = return [] extractCells opts (Div (_id,classes,kvs) xs : bs) | "cell" `elem` classes @@ -106,7 +106,7 @@ extractCells opts (Div (_id,classes,kvs) xs : bs) (newdoc, attachments) <- runStateT (walkM addAttachment (Pandoc nullMeta xs)) mempty source <- writeMarkdown opts{ writerTemplate = Nothing } newdoc - (Cell{ + (Ipynb.Cell{ cellType = Markdown , cellSource = Source $ breakLines $ T.stripEnd source , cellMetadata = meta @@ -123,7 +123,7 @@ extractCells opts (Div (_id,classes,kvs) xs : bs) let meta = pairsToJSONMeta kvs outputs <- catMaybes <$> mapM blockToOutput rest let exeCount = lookup "execution_count" kvs >>= safeRead - (Cell{ + (Ipynb.Cell{ cellType = Ipynb.Code { codeExecutionCount = exeCount , codeOutputs = outputs @@ -143,7 +143,7 @@ extractCells opts (Div (_id,classes,kvs) xs : bs) "markdown" -> "text/markdown" "rst" -> "text/x-rst" _ -> f - (Cell{ + (Ipynb.Cell{ cellType = Raw , cellSource = Source $ breakLines raw , cellMetadata = if format' == "ipynb" -- means no format given @@ -156,7 +156,7 @@ extractCells opts (CodeBlock (_id,classes,kvs) raw : bs) | "code" `elem` classes = do let meta = pairsToJSONMeta kvs let exeCount = lookup "execution_count" kvs >>= safeRead - (Cell{ + (Ipynb.Cell{ cellType = Ipynb.Code { codeExecutionCount = exeCount , codeOutputs = [] |