Org writer: prefix code language of ipynb code blocks with jupyter-.

This is the convention used by the *emacs-jupyter* package.
This commit is contained in:
Albert Krewinkel 2022-08-22 09:37:37 +02:00
parent a31cf9a005
commit 90610eb78c
No known key found for this signature in database
GPG key ID: 388DC0B21F631124

View file

@ -161,7 +161,9 @@ blockToOrg (CodeBlock (ident,classes,kvs) str) = do
let at = map pandocLangToOrg classes `intersect` orgLangIdentifiers
let lang = case at of
[] -> Nothing
l:_ -> Just l
l:_ -> if "code" `elem` classes -- check for ipynb code cell
then Just ("jupyter-" <> l)
else Just l
let args = mconcat $
[ " :" <> k <> " " <> v
| (k, v) <- kvs, k `notElem` ["startFrom", "org-language"]]