Skip to content
github  /   roadmap  /  

/ roadmap Public

  • Watch 1.1k

    Notifications

    Get push notifications on iOS or Android.

Mermaid diagrams can be displayed within Markdown #372

Open
github-product-roadmap opened this issue 7 days ago · 0 comments
Open

Mermaid diagrams can be displayed within Markdown #372

github-product-roadmap opened this issue 7 days ago · 0 comments

Comments

@github-product-roadmap

Collaborator

@github-product-roadmap github-product-roadmap commented 7 days ago

Summary

Mermaid is an incredibly popular Markdown-inspired syntax used to visualize workflows, software architecture, and abstract concepts in documentation. Support for displaying Mermaid diagrams has appeared on GitHub's top list of feature requests since 2015. In its absence, many developers simply added screenshots to their Markdown. Today, we're excited to add native support for Mermaid wherever Markdown is supported (e.g., issues, repositories, discussions, gists).

Intended Outcome

With this feature, GitHub will support Mermaid diagrams within Markdown fields and files.

How will it work?

Just as language-specific code blocks can be added to Markdown, you'll be able to add a Mermaid diagram using a code block that specifies mermaid as its language identifier. For example:

```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```

The Markdown code block above uses Mermaid syntax to display this flowchart in the rendered Markdown:

image

Another example from the Mermaid website shows how straightforward text can be used to create rich diagrams:

```mermaid
sequenceDiagram
    autonumber
    Alice->>John: Hello John, how are you?
    loop Healthcheck
        John->>John: Fight against hypochondria
    end
    Note right of John: Rational thoughts!
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!
```

The Markdown code block above would display this sequence diagram in the rendered Markdown:

For more information about Mermaid, visit its website or its open-source repository.

@github github locked and limited conversation to collaborators 7 days ago
@DanielBMarkham
An owner of this repository has limited the ability to comment to users that are collaborators on this repository.
Projects
Status: Q1 2022 – Jan-Mar
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant