Skip to content

Bidirectional arrows (<<->>) render incorrectly with autonumber in sequence diagrams #6721

@thienphuoc86

Description

@thienphuoc86

Description

When the autonumber feature is enabled in a sequence diagram, bidirectional arrows (<<->>) do not render as expected. The arrowhead at the start of the message is missing, and the sequence number is only placed at the beginning of the interaction. This makes the bidirectional flow appear as a one-directional message, which can cause confusion when documenting protocols or data flows that are inherently two-way.

Expected Behavior

A line with arrowheads at both ends should be drawn between participant A and participant B. The sequence number (e.g., "1") should be clearly associated with the entire bidirectional message.

Steps to reproduce

The issue can be reproduced with the following minimal code:

sequenceDiagram
    autonumber
    participant A
    participant B
    A<<->>B: This is a bidirectional message

Screenshots

Image

Code Sample


Setup

  • Mermaid version: v11.6.0
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions