fix: clean comments in text in getDiagramFromText API so flowchart works well#5076
Merged
sidharthv96 merged 9 commits intomermaid-js:developfrom Nov 28, 2023
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.
|
Contributor
Author
|
@sidharthv96 please let me know if you have concerns with the changes |
sidharthv96
requested changes
Nov 27, 2023
Member
|
Btw, if you already have a PR ready, you can raise it directly without creating an issue first. :) |
sidharthv96
reviewed
Nov 27, 2023
sidharthv96
approved these changes
Nov 28, 2023
Contributor
Author
|
Looks like the checks have hanged as the status isn't showing up so I will try pushing a dummy commit |
ad1992
commented
Nov 28, 2023
auto-merge was automatically disabled
November 28, 2023 06:35
Head branch was pushed to by a user without write access
Contributor
Author
|
@sidharthv96 you can merge this PR, I had to push a commit to trigger GH checks hence auto merging was disabled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5075
📑 Summary
This bug was introduced in v10.5.0 in #4759 and since the comments are not being cleaned when using the
getDiagramFromTextAPI, hence the flowchart with comments breaks.📏 Design Decisions
I am calling the API
cleanupCommentsin Diagram constructor to make sure the comments are always removed before creation and this works fine.📋 Tasks
Make sure you
MERMAID_RELEASE_VERSIONis used for all new features.developbranch