glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.51k stars 483 forks source link

Mermaid diagrams don't render in the Preview #1760

Closed saf-dmitry closed 2 months ago

saf-dmitry commented 2 months ago

Description

Mermaid diagrams don't render in the Preview showing Mermaid markup instead:

Screen Shot 2024-09-10 at 15 35 38

To Reproduce

  1. Open "6. Mermaid and MathJax" note from the "Welcome" directory
  2. Click on the Preview icon
  3. See the Mermaid example diagram displayed as markup instead of rendered graphics

Expected behavior

Fenced code blocks containing valid Mermaid syntax and mermaid language identifier appear in the Preview as rendered Mermaid diagrams.

FSNotes version

6.9.5 (644)

macOS/iOS version

macOS 10.15.7

Additional context

No response

glushchenko commented 2 months ago

Its disabled by default

saf-dmitry commented 2 months ago

Its disabled by default

As far as I remember, it was working before the last update, and I didn't change the settings since then.

How can I enable it again?

glushchenko commented 2 months ago

```mermaid graph TD A[Enter Chart Definition] --> B(Preview) B --> C{decide} C --> D[Keep] C --> E[Edit Definition] E --> B D --> F[Save Image and Code] F --> B ```

saf-dmitry commented 2 months ago

When I enter your example in FS Notes it looks as following.

Editor mode screenshot:

Screen Shot 2024-09-10 at 16 16 36

Preview mode screenshot:

Screen Shot 2024-09-10 at 16 16 18

As you can see, Preview shows me just centered markup text, but no rendered image. Strange...