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

Sequence Diagram: Comment following rect in the same line spoils the rect #5674

Closed
KSR-Yasuda opened this issue Jul 29, 2024 · 2 comments
Closed
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@KSR-Yasuda
Copy link

Description

Appending a comment right after rect without line changing,
the rect syntax does not work correctly.

Steps to reproduce

sequenceDiagram

    Alice->>+John: Hello John, how are you?
rect rgb(255, 138, 138)
    %% This works correctly.
    Alice->>+John: John, can you hear me?
end
rect rgb(255, 138, 138)     %% Comment here breaks the `rect`.
    John-->>-Alice: Hi Alice, I can hear you!
end
    John-->>-Alice: I feel great!
sequenceDiagram

    Alice->>+John: Hello John, how are you?
rect rgb(255, 138, 138)
    %% This works correctly.
    Alice->>+John: John, can you hear me?
end
rect rgb(255, 138, 138)     %% Comment here breaks the `rect`.
    John-->>-Alice: Hi Alice, I can hear you!
end
    John-->>-Alice: I feel great!
Loading

Screenshots

No response

Code Sample

As above.

Setup

  • Mermaid version: v10.9.1

Suggested Solutions

No response

Additional Context

No response

@KSR-Yasuda KSR-Yasuda added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jul 29, 2024
@OG-NI
Copy link
Contributor

OG-NI commented Jul 29, 2024

Comments need to be on their own line. https://mermaid.js.org/syntax/sequenceDiagram.html#comments

@KSR-Yasuda
Copy link
Author

@OG-NI So, it is not allowed for all the Mermaid syntax, not only rect, huh?

Okay, got it. I'll close this issue.

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

2 participants