Skip to content

Add linebreak to task gantt #5140

Open
Open
@tiarasilva

Description

Description

In the current version of Mermaid's Gantt charts, it appears that line breaks (e.g., using
tags or newline characters such as \n) within task descriptions do not produce the intended effect of creating a new line. While these HTML tags and escape sequences work as expected in section titles, they seem to be ineffectual within the task descriptions.

Steps to reproduce

  1. Create a Gantt chart
  2. Insert a line break on task description
  3. Render the Gantt

Screenshots

Captura de pantalla 2023-12-12 a la(s) 18 21 06

Code Sample

gantt
    title Sample Gantt Chart
    dateFormat YYYY-MM-DD

    section Sample Section
    Task with line break<br>Second line: done, 2023-12-04, 2w

Setup

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

Suggested Solutions

No response

Additional Context

No response

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