-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix: clean comments in text in getDiagramFromText API so flowchart works well #5076
fix: clean comments in text in getDiagramFromText API so flowchart works well #5076
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #5076 +/- ##
============================================
+ Coverage 42.91% 79.29% +36.38%
============================================
Files 23 165 +142
Lines 5029 13863 +8834
Branches 21 704 +683
============================================
+ Hits 2158 10993 +8835
+ Misses 2870 2720 -150
- Partials 1 150 +149
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@sidharthv96 please let me know if you have concerns with the changes |
Btw, if you already have a PR ready, you can raise it directly without creating an issue first. :) |
Looks like the checks have hanged as the status isn't showing up so I will try pushing a dummy commit |
Head branch was pushed to by a user without write access
@sidharthv96 you can merge this PR, I had to push a commit to trigger GH checks hence auto merging was disabled |
Resolves #5075
📑 Summary
This bug was introduced in v10.5.0 in #4759 and since the comments are not being cleaned when using the
getDiagramFromText
API, hence the flowchart with comments breaks.📏 Design Decisions
I am calling the API
cleanupComments
in Diagram constructor to make sure the comments are always removed before creation and this works fine.📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch