aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-07-02 09:03:56 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-07-02 09:03:56 -0700
commit804e8eeed2fbcd0b4a52ad908b8ccccf89563097 (patch)
treeaa2af71560c0895d47b61af739afaaababc48789 /src/Text/Pandoc/Writers
parent9afa192c3a401e43e591e2978561afccf6ab6b87 (diff)
downloadpandoc-804e8eeed2fbcd0b4a52ad908b8ccccf89563097.tar.gz
Revert "Ipnyb: allow lossless round-tripping of markdown cell content."
This reverts commit efbc2050315b60c8a753dee6255465f1083019ab.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Ipynb.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Ipynb.hs b/src/Text/Pandoc/Writers/Ipynb.hs
index 86e2abbdf..d01d5a7e5 100644
--- a/src/Text/Pandoc/Writers/Ipynb.hs
+++ b/src/Text/Pandoc/Writers/Ipynb.hs
@@ -102,13 +102,10 @@ extractCells _ [] = return []
extractCells opts (Div (_id,classes,kvs) xs : bs)
| "cell" `elem` classes
, "markdown" `elem` classes = do
- let meta = pairsToJSONMeta [(k,v) | (k,v) <- kvs, k /= "source"]
+ let meta = pairsToJSONMeta kvs
(newdoc, attachments) <-
runStateT (walkM addAttachment (Pandoc nullMeta xs)) mempty
- source <- case lookup "source" kvs of
- Just s -> return s
- Nothing -> writeMarkdown opts{ writerTemplate = Nothing }
- newdoc
+ source <- writeMarkdown opts{ writerTemplate = Nothing } newdoc
(Ipynb.Cell{
cellType = Markdown
, cellSource = Source $ breakLines $ T.stripEnd source