-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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: Node with text renders by default as Markdown #6087
base: develop
Are you sure you want to change the base?
Conversation
π¦ Changeset detectedLatest commit: 4693aa2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
β Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6087 +/- ##
==========================================
- Coverage 4.48% 4.48% -0.01%
==========================================
Files 383 383
Lines 54038 54057 +19
Branches 596 596
==========================================
Hits 2425 2425
- Misses 51613 51632 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
The latest updates on your projects. Learn more about Argos notifications βοΈ
|
addSvgBackground: !!node.icon || !!node.img, | ||
}); | ||
let text; | ||
if (node.labelType !== 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this is !== 'string'
rather than === 'markdown'
as was done in the edge?
As I understand it, in:
graph LR
foo[foo] --> bar["bar"] --> baz["`baz`"]
| name | labelType |
|------+-----------|
| foo | text |
| bar | string |
| baz | markdown |
My position is that both text
and string
labelTypes should be rendered as plain text, and only labelType markdown
should be rendered as markdown. Is there some case where that falls down for your needs?
@knsv I did a rebase of this branch on top of develop, and addressed my comment above, in new PR #6345. If it's easier for you to address the conflicts yourself to merge this, I would ask that you cherry-pick my 148c4f6 commit. For my purposes, I need both text and string labelTypes be treated as non-markdown. If there's anything I can do to help either this, #6345, or #6277 get to a state it can be merged, please let me know. |
β¦ text
π Summary
Adding differentiation between regular strings and markdown strings.
Resolves #5824 and #6048
π Design Decisions
Adding back createLabel for the cases where you do not want markdown text
π Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.