-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
HOLD: Bug 2492: first or last letter being dropped #7088
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
base: develop
Are you sure you want to change the base?
Conversation
Fixes #2492 The flowchart parser was incorrectly consuming 'o' or 'x' characters from node names when they appeared after arrows without spaces. For example, `dev---ops` was parsed as "dev" → "ps" instead of "dev" → "ops". Changes: - Modified lexer patterns in flow.jison to distinguish between: - Intentional arrow markers (--o, --x) followed by whitespace or uppercase - Node names starting with 'o' or 'x' (lowercase continuation) - Added 10 comprehensive tests to flow-arrows.spec.js covering: - Bug cases (dev---ops, dev---xerxes) - Backwards compatibility (A--oB, A --o B, etc.) - All arrow types (solid, thick, dotted) The fix uses smart pattern matching: - `--o ` (with space) → circle arrow marker - `--oB` (uppercase) → circle arrow marker - `--ops` (lowercase) → plain arrow, 'ops' is node name All 24 new tests pass. All 293 existing edge tests pass.
|
✅ 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: |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
|
Reviewing failures |
- Added lookahead patterns for arrows followed by lowercase letters (fixes #2492) - Added lookahead patterns for arrows followed by digits (fixes Sample 4 & 5) - Preserved edge text functionality with pipe delimiter lookahead - Applied fix to all arrow types: solid (--), thick (==), dotted (-.-) - Added comprehensive test coverage (21 tests total)
|
@sidharthv96 @aloisklink Whats the difference between all of the E2E / e2e checks? I notice that E2E / e2e (2) (pull_request) and E2E / e2e (4) (pull_request) are successful, but 1, 3 and 5 are not. I also need to look into the screenshot issues, because locally I thought they looked fine. |
|
Liugiolopoi |
📑 Summary
Resolves #2492
The flowchart parser was incorrectly consuming 'o' or 'x' characters from node names when they appeared after arrows without spaces. For example,
dev---opswas parsed as "dev" → "ps" instead of "dev" → "ops".Changes:
The fix uses smart pattern matching:
--o(with space) → circle arrow marker--oB(uppercase) → circle arrow marker--ops(lowercase) → plain arrow, 'ops' is node name📏 Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSIONis used for all new features.pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.