Live data from Hacker News

Include diagrams in your Markdown files with Mermaid

github.blog

271–272 of 272 posts

Re: Include diagrams in your Markdown files with Mermaid

#271
post #21

Earlier quoted context omitted.

Only the mermaid identifier is supported for triple backticks blocks, you can't put js and have it spit out script that executes in the browser.

I think op meant that we can: ```ruby # syntax highlighted as ruby a = 1 + 1 ``` And: ```js // syntax highlighted as js a = 1 + 1 ``` So maybe we should have something like a "bang" prefix to evaluate and inline/embed like: ```!ruby # evaluated as ruby a = 1 + 1 # renders 2 because of implicit return? ```

Would be good to copy from MkDocs Material

https://squidfunk.github.io/mkdocs-material/reference/code-b...

``` py hl_lines="2 3"

def bubble_sort(items):

    for i in range(len(items)):
        for j in range(len(items) - 1 - i):
            if items[j] > items[j + 1]:
                items[j], items[j + 1] = items[j + 1], items[j]
```

Re: Include diagrams in your Markdown files with Mermaid

#272
post #172

Earlier quoted context omitted.

It feels like Markdown and Jupyter notebooks in on the path to merging, and markdown is like the dumbed (need a different word for this, simplicated (though that that word is cumbersome)) down yaml which is a simplicated xml. Why don't we just go back to xml and provide decent structured editors?

Lack of high-quality free editors was a massive problem with xml, particularly when xsd was involved.

Yaml is now worse than the thing it was designed to replace. Rather than solve the real problem (ungood editors), we prop up and extend a janky solution.
Post reply on HN