Skip to content

feat: treat entire block as mermaid#131

Open
chrisirhc wants to merge 1 commit into
shikijs:mainfrom
chrisirhc:chua/03-07-highlight-mermaid
Open

feat: treat entire block as mermaid#131
chrisirhc wants to merge 1 commit into
shikijs:mainfrom
chrisirhc:chua/03-07-highlight-mermaid

Conversation

@chrisirhc

@chrisirhc chrisirhc commented Mar 7, 2025

Copy link
Copy Markdown
Contributor

Previously, a code block was required to treat the code as mermaid. This does away with that requirement.

Before:
image

After:
image

I also did some adhoc testing that this doesn't break/change rendering between markdown code blocks.

Previously, a code block was required to treat the code as mermaid.
This does away with that requirement.
@netlify

netlify Bot commented Mar 7, 2025

Copy link
Copy Markdown

Deploy Preview for textmate-grammars-themes failed.

Name Link
🔨 Latest commit 6dc5599
🔍 Latest deploy log https://app.netlify.com/sites/textmate-grammars-themes/deploys/67cafa225e698c0008196c23

@slevithan

Copy link
Copy Markdown
Contributor

Does this need to be patched here? Wouldn't this be better changed in the upstream grammar?

@chrisirhc

chrisirhc commented May 8, 2025

Copy link
Copy Markdown
Contributor Author

Does this need to be patched here? Wouldn't this be better changed in the upstream grammar?

My bad, I didn't realize there's an upstream. Will propose a fix there. Thank you for pointing that out!

Update: looks like the upstream is https://github.com/bpruitt-goddard/vscode-mermaid-syntax-highlight/blob/master/syntaxes/mermaid.tmLanguage-mdx.yaml , which is a mermaid code block.

@Rednas83

Copy link
Copy Markdown

I am also unable to get syntax highlighting with mermaid but I would not prefer installing TextMate.

As a workaround I am using pre for now
<pre><code class="language-mermaid">...</code></pre>

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

Successfully merging this pull request may close these issues.

3 participants