News for hackers. Stuff that matters.
Re:Include diagrams in your Markdown files with Mermaid by tehbeard on Monday February 14, 2022 @01:20PM (#30335796)
You missed the point, that being; isn't triple backticks meant for whitespace preserving, highlighted in certain cases source code? And not embedding other file types.
Re:Include diagrams in your Markdown files with Mermaid by qbasic_forever on Monday February 14, 2022 @01:25PM (#30335898)
No there's not a formal requirement or spec for how markdown blocks are rendered. Even things like syntax highlighting are optional choices different renderers make (and even the whole idea of highlighting is not specified or defined, how do you define the grammer, etc?).

Some tools in the computational notebook space use markdown with fenced code blocks as blocks of executable code, see for example jupytext: https://github.com/mwouts/jupytext/blob/main/docs/formats.md or myst markdown: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.h... or nbconvert: https://nbconvert.readthedocs.io/en/latest/

Re:Include diagrams in your Markdown files with Mermaid by dijit on Monday February 14, 2022 @03:27PM (#30337822)
There is a formal spec (from github themselves) for how it’s rendered.

What’s debatable is what the spec does with the “info” section.

https://github.github.com/gfm/#fenced-code-blocks

Re:Include diagrams in your Markdown files with Mermaid by qbasic_forever on Monday February 14, 2022 @03:41PM (#30337996)
Sure but there's no markdown spec. Markdown is purely a series of blog posts by John Gruber and a collection of different implementations. CommonMark is as close to as it's gotten to a formal spec, and even it says there is no requirement the info string (i.e. text like mermaid after backticks) be interpreted for specific rendering (or not rendering) of the content: https://spec.commonmark.org/0.28/#fenced-code-blocks