Ipynb reader: fix duplication of 'source' attribute.

See #5408.
This commit is contained in:
John MacFarlane 2020-07-02 09:00:52 -07:00
parent 761e62c678
commit 2d009366ce

View file

@ -79,7 +79,7 @@ cellToBlocks opts lang c = do
case cellType c of case cellType c of
Ipynb.Markdown -> do Ipynb.Markdown -> do
Pandoc _ bs <- walk fixImage <$> readMarkdown opts source Pandoc _ bs <- walk fixImage <$> readMarkdown opts source
let kvs' = ("source", source) : kvs let kvs' = ("source", source) : [(k,v) | (k,v) <- kvs, k /= "source"]
return $ B.divWith ("",["cell","markdown"],kvs') return $ B.divWith ("",["cell","markdown"],kvs')
$ B.fromList bs $ B.fromList bs
Ipynb.Heading lev -> do Ipynb.Heading lev -> do