Repository navigation
fix(state): allow colons in transition and state description text - #7430
Merged
Merged
Conversation
The DESCR lexer rule in stateDiagram.jison excluded colons from the character class, causing parse errors when transition labels contained colons (e.g. "recoverable error (ex: timeout)"). Changed the regex to use an alternation that permits colons followed by non-colon characters, while still preventing the `:::` style separator from being consumed. Resolves #7418 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 409bf91 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 project configuration. |
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7430 +/- ##
==========================================
- Coverage 3.55% 3.54% -0.02%
==========================================
Files 490 491 +1
Lines 48785 48949 +164
Branches 765 766 +1
==========================================
Hits 1734 1734
- Misses 47051 47215 +164
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Add scripts/verify-diagram/verify.mjs for visual spot-checking of rendered diagrams during development. Uses Playwright to render a .mmd file via the dev server and save a cropped screenshot. Auto-detects the dev server port from .env, MERMAID_PORT env var, or defaults to 9000. Includes error handling for missing server, render failures, and timeouts. Add playwright as a dev dependency to support the verify script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
- Add eslint-disable no-console (CLI tool, console output is intentional) - Add curly braces to all if-return statements - Use RegExp#exec() instead of String#match() - Add cspell:ignore for Playwright's networkidle API term Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Resolves #7418
DESCRlexer rule instateDiagram.jisonto allow colons inside transition labels and state descriptions[^:\n;]+(which excluded colons) to an alternation(?:[^:\n;]|:[^:\n;])+that permits colons followed by non-colon characters, while preserving:::style separator parsingClassification
Verification
pnpm vitest run packages/mermaid/src/diagrams/state/)rendering-util/touched🤖 Generated with Claude Code