Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mermaid.js scripts in ipynb markdown #1072

Open
psychemedia opened this issue Jun 6, 2023 · 2 comments
Open

mermaid.js scripts in ipynb markdown #1072

psychemedia opened this issue Jun 6, 2023 · 2 comments

Comments

@psychemedia
Copy link

A heads up regarding a PR in JupyterLab, and associated JEP request that introduces support for rendering mermaid.js diagrams for diagrams described using the GFM syntax:

```mermaid
flowchart LR
  chicken --> egg --> chicken
```

In .qmd and .myst the corresponding syntax is:

```{mermaid}
flowchart LR
  chicken --> egg --> chicken
```

Comments to the JupyterLab PR hint that support for additional diagram types, presumably using a similar syntactic approach, are possible.

@mwouts
Copy link
Owner

mwouts commented Jun 8, 2023

Hey @psychemedia , thanks for the links!

Are you suggesting that we should do the translation from

```mermaid

in ipynb documents, to

```{mermaid}

in .qmd or .myst ? or should we plan something other than this?

@psychemedia
Copy link
Author

It was more of a heads up that the diagram scripts are being added to ipynb/gfm markdown using one form of syntax, and qmd and myst use another.

It's going to be confusing, I think, for ipynb docs. Eg if you author ipynb docs with the JuptyerLab MSTt extension you would presumably use MyST syntax, but if you are in a vanilla JupyterLab environment, the syntax will be GLF flavoured.

Converting to qmd, MyST should be easy enough, but returning to ipynb may depend on the user. Does ipynb use metadata to say whether someone has been using MyST or GFM (default), for example, in markdown cells?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants