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

Change in Gantt parsing eliminates end-of-line "#" comments #5934

Open
colindean opened this issue Oct 4, 2024 · 0 comments
Open

Change in Gantt parsing eliminates end-of-line "#" comments #5934

colindean opened this issue Oct 4, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@colindean
Copy link

colindean commented Oct 4, 2024

Description

I use end-of-line # comments to update the date on rolling line items more easily in a few Gantt charts I maintain as a workaround until #3532 is implemented adding a now() or similar as a valid enddate.

I'm able to run once in a while a regex find-and-replace script that simply updates the date.

In playing around in mermaid.live, I found that it seems like no # comments are working. I tried a few other characters and they all fail. Looking at the documentation, I see that %% on its own line works, but know from 18 months of maintaining this that # worked at the end of a line, too.

Steps to reproduce

Put this code into Mermaid.live:

gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d # comment
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d

and note that it doesn't work on GitHub anymore, either.

gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d # comment
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d
Loading

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: 11.3.0 (what's on Mermaid.live right now)
  • Browser and Version: Firefox 129.0.2 on macOS 14.6.1.

I was using Mermaid in this context primarily through GitHub Enterprise, and when my company updated to GHES 3.13, we got Mermaid updates through it wherein this previously working functionality was broken.

Suggested Solutions

  1. Restore end-of-line # comment functionality
  2. Enable %% to work at the end of a line.

Additional Context

No response

@colindean colindean added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Oct 4, 2024
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