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

Flowchart (TD): Styling node with height/width 0 and annotated link results in error #5078

Open
omaus opened this issue Nov 27, 2023 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@omaus
Copy link

omaus commented Nov 27, 2023

Description

When any node with height or width 0 has an annotated link to another node, it results in a syntax error.
Only occurs in TD, LR is not affected.

Steps to reproduce

  1. Paste the Code Sample below into the live editor or use the link
  2. See error (at the bottom of the live editor)

Screenshots

No response

Code Sample

graph 
    a -->|hello world| b

    style b height:0px,width:0px

%% or

graph 
    a -->|hello world| b

    style a height:0px,width:0px

%% link:
https://mermaid.live/edit#pako:eNolT7FuwyAU_BV0M4lIZNeEoVPXTt0qFhJeAyoGi2AlruN_L3bedLo73bubcUmWoHDNZnBMR1bPsN3u_ekohMTuKQf7ZGcdX9qtTIHYmTnyV1eUGB787m1xKwJHT7k33tbAefVrFEc9aagKrcm_Gjou1WfGkr6meIEqeSSOcbCm0Ic3tUcP9WPCrbKDiVAzHlBdu5dSdMejaFp5kk3DMUEdTm_7tql02wkpRCcXjr-UasCBg6wvKX--5m0rt8DvTV-_Lv_cP07N

Setup

  • Mermaid version: 10.6.1
  • Browser and Version: Firefox 120.0

Suggested Solutions

No response

Additional Context

Workaround:

graph 
    a -->|hello world| b

    style b height:0.0001px,width:0.0001px

results in

graph 
    a -->|hello world| b

    style b height:0.0001px,width:0.0001px
Loading
@omaus omaus added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant