secure-77 / Perlite

A web-based markdown viewer optimized for Obsidian
https://perlite.secure77.de/
MIT License
1.06k stars 92 forks source link

Update Mermaid.js #95

Closed MrDj200 closed 1 year ago

MrDj200 commented 1 year ago

Is your feature request related to a problem? Please describe. Mermaid.js is outdated and does not render my graph. Instead it's giving me a "Syntax Error" image

Describe the solution you'd like I'd like mermaid.js to be updated to a newer version. Perlite seems to be quite a few major releases behind

Describe alternatives you've considered I considered using Canvas, but that is not supported at all by Perlite at the time of writing (#72)

Additional context The mermaid chart I'm trying to show:

---
title: "Arma 3 - Basic Medical in ACE"
---
flowchart TD
    977290(["Unresponsive patient"]) --> 289944{"Is their body ragdolled or limp?"}
    289944 -->|"Yes"| 227197("Patient ded")
    289944 -->|"No"| 335680{"Lost more than #quot;some#quot; blood?"}
    335680 -->|"No"| 122890("Inject Epinephrine")
    335680 -->|"Yes"| 623814("Stop the bleeding.\nRefer to Bleeding guide")
    122890 --> 623814
    623814 --> 549744("Transfuse blood.\nRefer to  transfusion guide")
    549744 --> 682444("Fully bandage all limbs")
    682444 --> 109205("Remove tourniquets")
    109205 --> 263334{"Lost more than #quot;some#quot; blood?"}
    263334 -->|"Yes"| 644629("Wait for transfusion")
    644629 --> 263334
    263334 -->|"No"| 432937{"Patient still unconscious?"}
    432937 -->|"Yes"| 829784("Inject Epinephrine")
    432937 -->|"No"| 601555(["Alive!"])
secure-77 commented 1 year ago

this is updated on the dev branche, will merge it in the next days to main

secure-77 commented 1 year ago

fixed in 1.5.7, mermaid is now loaded from the CDN