@@ -77,9 +77,14 @@ pandocToNotebook opts (Pandoc meta blocks) = do
7777 opts{ writerTemplate = Nothing } (Pandoc nullMeta bs)
7878 let inlineWriter ils = T.stripEnd <$> writeMarkdown
7979 opts{ writerTemplate = Nothing } (Pandoc nullMeta [Plain ils])
80+ let jupyterMeta =
81+ case lookupMeta "jupyter" meta of
82+ Just (MetaMap m) -> (Meta m <> B.deleteMeta "jupyter" meta)
83+ _ -> meta
8084 metadata' <- metaToJSON' blockWriter inlineWriter $
8185 B.deleteMeta "nbformat" $
82− B.deleteMeta "nbformat_minor" $ meta
86+ B.deleteMeta "nbformat_minor" $ jupyterMeta
87+ -- convert from a Value (JSON object) to a M.Map Text Value:
8388 let metadata = case fromJSON metadata' of
8489 Error _ -> mempty -- TODO warning here? shouldn't happen
8590 Success x -> x