Hi all, Some food for thought on simple code block namespaces. Re: https://github.com/github/markup/issues/533 I’m the main author of KeenWrite (see screenshots ), a type of desktop Markdown editor that supports diagrams. It’s encouraging to see that Mermaid diagrams are being supported in GitHub. There are a few drawbacks on the syntax and implications of using MermaidJS. First, only browser-based SVG renderers can correctly parse Mermaid diagrams. I’ve tested Apache Batik, svgSalamander, resvg, rsvg-convert, svglib, CairoSVG, ConTeXt, and QtSVG. See issue 2485 . This implies that typesetting Mermaid documents is not currently possible. In effect, by including Mermaid diagrams, many documents will be restricted to web-based output, excluding the possibility of producing PDF documents based on GitHub markdown documents (for the foreseeable future). Second, there are numerous text-to-diagram facilities available beyond Mermaid. The server at https://kroki.io/ supports Mermaid, PlantUML, Graphviz, byte fields, and many more. While including MermaidJS is a great step forward, supporting Kroki diagrams would allow a much greater variety. (Most diagrams produced in MermaidJS can also be crafted in Graphviz, albeit with less terse syntax.) Third, see the CommonMark discussion thread referring to a syntax for diagrams. It’s unfortunate that a standard “namespace” concept was not proposed. Fourth, KeenWrite integrates Kroki. To do so, it uses a variation on the syntax: ``` diagram-mermaid ``` ``` diagram-graphviz ``` ``` diagram-plantuml ``` The diagram- prefix tells KeenWrite that the content is a diagram. The prefix is necessary to allow using *any* diagram supported by a Kroki server without having to hard-code the supported diagram type within KeenWrite. Otherwise, there is no simple way to allow a user to mark up a code block with their own text style that may coincide with an existing diagram type name. Fifth, if ever someone wants to invent a programming language named Mermaid (see MeLa ), then it precludes the possibility of using the following *de facto* syntax highlighting: ``` mermaid ``` My feature request is to add support for Kroki and the diagram- prefix syntax. That is: ``` diagram-mermaid ``` And deprecate the following syntax: ``` mermaid ``` And, later, introduce the language- prefix for defining code blocks that highlight syntax. That is, further deprecate: ``` java ``` With the following: ``` language-java ``` That would provide a “namespace” of sorts to avoid naming conflicts in the future. -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6a978c09-0b8d-4199-862a-0a0b78955a41n%40googlegroups.com.