Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mmdc not generating labels for SVG outputs #691

Open
radupotop opened this issue May 7, 2024 · 3 comments
Open

mmdc not generating labels for SVG outputs #691

radupotop opened this issue May 7, 2024 · 3 comments

Comments

@radupotop
Copy link

Describe the bug

mmdc does not generate labels when outputting SVG files.
This happens for flow charts and class charts on my machine, but not for sequence diagrams for example.

To Reproduce
Steps to reproduce the behavior:

echo "graph TD; THIS-->THAT; THAT-->THIS" | mmdc -i -

Output:

image

Expected behavior

The graph should include labels like so:

out

Desktop (please complete the following information):

  • Linux x86_64 6.8.9
  • gtk2 2.24.33-3
  • gtk3 3.24.41-1
  • gtk4 4.14.4-1
  • cairo 1.18.0-2
  • pango 1.52.2-1

My gut feeling is this is related to rendering on my machine (pango, cairo, etc).

@radupotop
Copy link
Author

Opened a corresponding issue here with librsvg:
https://gitlab.gnome.org/GNOME/librsvg/-/issues/1082

@radupotop
Copy link
Author

It looks like this is an issue with mermaid-cli after all:

This SVG uses foreignObject to embed HTML text. Supporting this would basically involve having a whole HTML renderer inside librsvg. Please tell mermaid-cli to use SVG text elements instead.

@threepistons
Copy link

threepistons commented Sep 22, 2024

I have this problem too.

  • Debian 12.7
  • Linux kernel 6.1.0-23-amd64
  • libpango 1.50.12+ds-1
  • libcairo 1.16.0-7
  • libgtk3 3.24.38-2~deb12u2
  • libgtk2 2.24.33-2+deb12u1

My input Markdown file and output PNG and SVG files are attached, as are how Inkscape and Gwenview render the SVG file.
wardrobe-sort.md
wardrobe-sort
wardrobe-sort
gwenview
inkscape

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants