Skip to content

Vertical alignment of multiline nodes incorrect when downloaded from live editor. #5159

Open
@dloeckx

Description

Description

When I download a png or svg from the live editor with a multi-line node, the vertical alignment of the text is wrong, causing the text to be partially invisible. When I open the png or svg in the browser, everything looks fine.

Steps to reproduce

  1. Go to the live editor
  2. Paste the code below
  3. Under actions, download the image with
    image --> the text in the node is partially invisible
  4. Under actions, open the image in a new window with
    image --> Everything looks fine.

Screenshots

Broken png (downloaded):
mermaid-diagram-2023-12-22-153806

Correct png (copy-paste from browser png):
image

Code Sample

flowchart TD
  TXT("`Multi
    Line`")

Setup

Suggested Solutions

No response

Additional Context

I encountered this bug when exporting pdfs with embedded Mermaid Graphs using Mermaid Diagrams for Confluence

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions