Repository navigation
Replies: 1 comment
|
PR that implements this: withastro/astro#13311 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Body
Summary
Add an option to exclude certain languages from syntax highlighting.
Background & Motivation
Syntax highlighting adds markup to code blocks. The default Mermaids integration fails and deems it as invalid syntax.
Uses are then to choose between syntax highlighting and managing syntax highlighting themselves to add diagram support.
There's evidence that such an API is already useful in the code base because the math language is already excluded from syntax highlighting, https://github.com/withastro/astro/blob/4cb33770d3f5c9c2ff658e2ba8067a72d9487564/packages/markdown/remark/src/highlight.ts#L65
Past related request: #267
Hugo supports it via their render hooks https://gohugo.io/content-management/diagrams/#mermaid-diagram
Related thread on BlueSky: https://bsky.app/profile/sirh.cc/post/3liwgkkaoy22r
Goals
-# Example
All reactions