Skip to content

[pull] develop from mermaid-js:develop#152

Merged
pull[bot] merged 26 commits into
code:developfrom
mermaid-js:develop
Apr 21, 2026
Merged

[pull] develop from mermaid-js:develop#152
pull[bot] merged 26 commits into
code:developfrom
mermaid-js:develop

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 21, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

RodrigojndSantos and others added 26 commits March 23, 2026 11:59
Lines starting with %% are now only recognized as comments if they are
on their own line. Inline %% comments or lines starting with a single %
are no longer treated as comments and are parsed as normal states or
transitions.

Previously, the parser could:
- Treat %% inline comments as actual comments, losing line content.
- Treat lines starting with % as comments, discarding valid states.

Adds regression tests for each scenario.

Fixes #7090
Addresses feedback from the review:
- Comments after blank lines are now recognized;
- Adds tests for blank-line and edge-case scenarios;
- Adds a brief code comment in the test explaining the
expected behavior for inline %%.

Fixes #7090
Move all diagram-specific Cypress specs from the flat
cypress/integration/rendering/ directory into per-diagram subfolders
(e.g. cypress/integration/rendering/flowchart/).

The detection script now uses filesystem discovery instead of a
hardcoded DIAGRAM_SPEC_MAP: it checks whether
cypress/integration/rendering/<diagram-name>/ exists and returns
a glob pattern (cypress/integration/rendering/<name>/**) as the
--spec argument. Adding a new spec to a subfolder requires zero
config changes.

Cross-cutting specs (theme, conf-and-directives, shapes, etc.) remain
at the root of cypress/integration/rendering/ and continue to trigger
the full suite.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ntion

Any spec file at the root of cypress/integration/rendering/ is treated
as cross-cutting (full suite). Any spec in a subfolder is scoped to that
subfolder. No explicit list to maintain — the directory position is the
convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Addresses feedback from the review:
- Updates lexer to allow '%%' comments both at start-of-line
and inline;
- Treats a single '%' as normal text instead of a comment;
- Updates stateDiagram.md documentation to clarify the new
comment syntax;
- Adds unit tests for inline comments and single '%' scenarios.

Fixes #7090
The tidy-tree layout's calculateEdgePositions only added intermediate
routing points for source/target nodes in the 'left' or 'right' section.
For root-sourced edges (section === 'root'), no intermediate point was
pushed, so the post-loop intersection recompute used the child's center
as the reference and could land the start anchor on the root's top/bottom
edge instead of its left/right edge — visually disconnecting the link.
The cloud root only appeared correct by coincidence of its rounded shape.

Add 'root' branches to both the source and target intermediate-point
blocks. The root-side intermediate is placed on the side facing the
other node's section.

Resolves #7572

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(stateDiagram): enforce strict comment syntax
feat(ci): diagram-scoped e2e test selection
…oot-edges

fix(tidy-tree): keep mindmap edges connected to a non-circular root
@pull pull Bot locked and limited conversation to collaborators Apr 21, 2026
@pull pull Bot added the ⤵️ pull label Apr 21, 2026
@pull pull Bot merged commit 2fe6e55 into code:develop Apr 21, 2026
10 of 12 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants