Live data from Hacker News

Include diagrams in your Markdown files with Mermaid

github.blog

181–190 of 272 posts

Re: Include diagrams in your Markdown files with Mermaid

#181
post #120

Been using in this way with Gitlab along with PlantUML for years. Slightly prefer PlantUML, feel like its a little bit more similar to native markdown due to the way it employs natural language. Would be nice if Github looked at that option too.

Been using plantuml for ever in gitlab markdown.

But lets reinvent the world in Js.. NIH is strong

Re: Include diagrams in your Markdown files with Mermaid

#182
post #81

Joplin, the Open source note-taking app¹, has Mermaid built-in. I use those a lot when keeping my notes on arcitectures, design patterns and software design. I prefer this, vastly, over Google Docs + draw.io. The only thing I dislike about Mermaid-in-Joplin is that the live-pre-render of the actual chart fails and shows an error whenever there is an error in the source of the diagram. Which makes sense. But is annoyi…

I use Joplin at home and want to use it for taking notes at work. I love it.

Re: Include diagrams in your Markdown files with Mermaid

#183
post #137

I love Mermaid! I used to use that bitch all the time in college to make beautiful flowcharts and my friends would always ask me how I made them so nice looking. Another awesome thing about Mermaid is since it’s grounded in the HTML/CSS/JS web stack you can easily modify certain things in diagrams to do any custom tricks you need for your specific diagram. Aka Mermaid is hackable and I love software that is designed…

Can you show more?

Re: Include diagrams in your Markdown files with Mermaid

#184
post #43

Earlier quoted context omitted.

The "spirit of markdown" has long been abandoned by GitHub, more often than not the offline readability of a README is absolutely ignored in exchange for a safe-HTML subset to create kind-of websites below the directory listing of a repository. It should really be called RENDERME.

To be fair, I'm not sure "offline readability" is an actual problem anymore. VS Code and (presumably) other IDEs offer a very simple live-preview window for viewing and editing markdown files.

My vanilla vim on ssh begs to differ. Offline readability matters

Re: Include diagrams in your Markdown files with Mermaid

#185
post #95

Earlier quoted context omitted.

I think the parent comment is just saying that multiple vulns have been found recently. There's a good chance there's more.

Not sure if this is bad? Should we abandon any lib that has cve?

YES! Also, make sure to disinfect the computer EVERY NIGHT with rubbing alcohol to be safe from VIRALS!

Re: Include diagrams in your Markdown files with Mermaid

#187

I think so-called ASCII-art is more in the spirit of Markdown. The nice thing about the original Markdown (modulo bugs) is that things are written the way one would write plaintext documents which are supposed to be easily read in a text editor. So you don’t write bullet lists like this: - Bullet 1 - Bullet 2 - Bullet 3 And hope that some post-processing will add linebreaks for you. You write it like this: - Bullet 1…

i tend to find that asci art usually looks like a broken mess.

if i was to have a graph view thats equally readable when not rendered, id want the barebones bits of graph viz's dot syntax

Re: Include diagrams in your Markdown files with Mermaid

#188

Gitlab supports mermaid too. It's always nice when there's feature parity between the two, as it makes it easier to jump between them.

Been using it in Gitlab for a while, was rather surprised Github didn't support it when I pushed a repo there.

There was an outstanding feature request on their forum for quite some while so didn't hold my breath for this to be added but glad it has.

Re: Include diagrams in your Markdown files with Mermaid

#189

What we do at our co is run a Hugo plugin which, when an SVG is embedded in the document, provides an _Edit in https://app.diagrams.net/_ link for that SVG. IMO, this was the missing piece for us when it came to keeping diagrams up to date.

That is such a great idea. Thank you for sharing that.

Re: Include diagrams in your Markdown files with Mermaid

#190

Protip to anyone using Mermaid.js Don't. It's a sea shanty of XSS vulns. https://snyk.io/vuln/npm%3Amermaid

I don't quite understand. Does XSS mean it runs user submitted js code? I thought it would have a parser that parses the submitted code to generate its own graph representation. there shouldn't be a chance for running js, no?

[deleted]
Post reply on HN