4 ms·
I really don't like overloading ```X as a way to render the output of running the code, because now you have no way to display a block of raw mermaid or math co
by infogulch 4y ago
I really don't like overloading ```X as a way to render the output of running the code, because now you have no way to display a block of raw mermaid or math code which is the whole point of ``` in the first place. I would be much happier if they introduced a syntax variation to enable this feature more generally instead of overloading the purpose of backticks, something like ```!X (```!math or ```!mermaid) for "run the contents as X and render the output in the document".
- rustyminnow 4y agoI was confused about your comment at first - I was sure it was already a feature where you could use ```X to render the contents with a language. E.g. you could go ```java or ```javascript and get syntax highlighting for that language. What you're saying is since ```mermaid now renders a mermaid diagram, there isn't a way to display a block of raw mermaid code with syntax highlighting. That's a very valid point.
- whatshisface 4y agoThey could add a ```mermaid-source tag.
- infogulch 4y agoI agree my comment was difficult to understand, so I edited it to hopefully make it better. Thank you!
- thangalin 4y agoKeenWrite[1] uses a "diagram-" prefix for text-based diagrams[2]. What's needed is a standards body for Markdown[3]. GitHub should not be imposing de facto standards. [1]: https://github.com/DaveJarvis/keenwrite https://github.com/DaveJarvis/keenwrite [2]: https://kroki.io/ https://kroki.io/ [3]: https://talk.commonmark.org/ https://talk.commonmark.org/
- ratmice 4y agoThe simple fix for this is that you should use "```math render" or some such, the language is specified as the first word with everything after the space up to the newline currently ignored...
- infogulch 4y ago> everything after the space up to the newline currently ignored Oh I didn't know that, that's perfect!
- nschloe 4y agoThe big advantage of using code blocks is that is guarantees that their sanitizer doesn't mess with the contents. This is a pretty big plus. Also, you can of course still have mermaid code blocks; just don't put `mermaid` after the three backticks. The code block won't have any syntax highlighting, but in the case of `math`, this wouldn't make sense anyway.