3 ms·
Mermaid has heaps of problems. I discovered this when I tried extending it myself. Firstly, neither its parser and its visualiser can be extracted from the lib
by zero_shift 4y ago
Mermaid has heaps of problems. I discovered this when I tried extending it myself.
Firstly, neither its parser and its visualiser can be extracted from the library. You can't process a grammar on a backend and then render out an SVG. You can't generate an SVG as part of a CLI tool - not without spinning up a web browser in automation mode.
Secondly, the grammar is messy. Really really awkward. Flowcharts are OK because they were the first Mermaid usecase, but other grammars are quite weirdly written, brittle, and try to be a mismash of other DSLs. Which in turn leads to very awkward token choices to avoid stepping on the toes of parts that are UML-like, parts that are DOT-like, etc etc
My impression reading Mermaid's issues is that it was built from scratch by a JS developer who hadn't any previous experience with DSLs, parsers, or language design, and largely learned as he went along. That's acceptable for a proof of concept. But as a finished product Mermaid is a lumbering mess