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

Parsing Mermaid incorrect #8

Open
rcmlz opened this issue Oct 17, 2024 · 1 comment
Open

Parsing Mermaid incorrect #8

rcmlz opened this issue Oct 17, 2024 · 1 comment

Comments

@rcmlz
Copy link

rcmlz commented Oct 17, 2024

Mermaid should be not a code block but a markdown block in .ipynb

Testcase:

When having a mermaid block in a Markdown file like this:

# Mermaid Demo

```mermaid
flowchart LR

A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
```

# Code Demo

```python
print("I am a code block")
```

Markdown::Grammar creates the following .ipynb

    {
      "metadata": {
      },
      "execution_count": 0,
      "cell_type": "code",
      "outputs": [
      ],
      "source": "flowchart LR\n\nA[Hard] -->|Text| B(Round)\nB --> C{Decision}\nC -->|One| D[Result 1]\nC -->|Two| E[Result 2]"
    },
}

but it should create

{
    {
      "metadata": {
      },
      "cell_type": "markdown",
      "source": "```mermaid\nflowchart LR\n\nA[Hard] -->|Text| B(Round)\nB --> C{Decision}\nC -->|One| D[Result 1]\nC -->|Two| E[Result 2]\n```"
    },
}
@rcmlz
Copy link
Author

rcmlz commented Oct 17, 2024

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

1 participant