bak
December 5, 2020, 12:21am
1
I see that the mermaid.js library was added to gitea v 1.13. Is anybody able to get this working?
For example, I thought all I had to do was include markdown like this:
mermaid
stateDiagram
[*] → Active
state Active {
[*] → NumLockOff
NumLockOff → NumLockOn : EvNumLockPressed
NumLockOn → NumLockOff : EvNumLockPressed
}
and it should display a nice looking mermaid chart. Instead, I just see the block being displayed as if it were code.
Is anybody else having this issue?
matm
December 6, 2020, 7:42am
2
Just tried on a wiki page in v1.13, it works pretty well:
```mermaid
graph TD
Start --> End
```
Then hit the “Preview” button to see the graph.
bak
December 6, 2020, 3:33pm
3
Aha! Thanks for confirmation that it works.
Turns out my problem was that I had a custom markdown configuration that uses pandoc to render markdown. Once removed, mermaid now works…now I just have to remember why I was using pandoc in the first place!
Hi,
I have .mmd files in my project and was hoping they also would display properly.
According the mermaid.js .mmd and .mermaid are officially supported file extensions
Applications that support Mermaid files SHOULD use .mermaid or .mmd file extensions.
(Integrations - create | Mermaid )
However, when I select a .mmd file in the web UI it is shown as text, not rendered.
Would be nice to support this as inlining large mermaid charts inside Markdown is cumbersome.