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

Add language support for Mermaid diagrams #6134

Merged
merged 3 commits into from
Oct 26, 2022
Merged

Add language support for Mermaid diagrams #6134

merged 3 commits into from
Oct 26, 2022

Conversation

Alhadis
Copy link
Collaborator

@Alhadis Alhadis commented Oct 25, 2022

Description

This PR adds formal support for Mermaid diagrams, which are already recognised by GitHub's markup processor:

<pre lang="mermaid"><code>flowchart LR
	A[Hard edge] -->|Link text| B(Round edge)
	B --> C{Decision}
	C -->|One| D[Result one]
	C -->|Two| E[Result two]</code></pre>
flowchart LR
	A[Hard edge] -->|Link text| B(Round edge)
	B --> C{Decision}
	C -->|One| D[Result one]
	C -->|Two| E[Result two]
Loading

I've included mermaid example as an alias so that snippets of Mermaid source can be embeddedand highlighted without being physically rendered. It's already in-use by Mermaid's docs.

@lildude I'm gauchely assuming that both the .mmd and .mermaid extensions satisfy our popularity requirements. Correct me if I'm wrong. 😉

Checklist:

  • I am adding a new language.
    • The extension of the new language is used in hundreds of repositories
      Probably. See the @mention above.
    • I have included a real-world usage sample for all extensions added in this PR
      Each sample was either taken from Mermaid's documentation (which is MIT-licensed), or written by yours truly during development of Alhadis/language-mermaid.
    • I have included a syntax highlighting grammar
    • I have updated the heuristics to distinguish my language from others using the same extension.

@Alhadis Alhadis requested a review from a team as a code owner October 25, 2022 16:40
@Alhadis Alhadis requested a review from lildude October 25, 2022 16:40
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, usage looks good with a good distribution of the 810 .mermaid files.

@Alhadis Alhadis merged commit 737d12e into master Oct 26, 2022
@Alhadis Alhadis deleted the mermaid branch October 26, 2022 14:36
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants