Skip to content

Release v0.1.4: support unquoted multi-word subgraph titles - #7

Merged
cmwright merged 2 commits into
mainfrom
release/v0.1.4
Jun 19, 2026
Merged

Release v0.1.4: support unquoted multi-word subgraph titles#7
cmwright merged 2 commits into
mainfrom
release/v0.1.4

Conversation

@cmwright

Copy link
Copy Markdown
Owner

Summary

Fixes a parse failure on subgraph titles written without quotes or brackets, e.g. subgraph Workflow Engine, which Mermaid accepts. The grammar previously matched only the first identifier (Workflow) and then failed on the remaining words.

flowchart LR
    AT --> WE
    subgraph Workflow Engine
        WE[Event consumer] --> SUB{Match}
    end

Changes

  • Grammar: add an unquoted-label alternative to subgraph_header, ordered after the explicit id[label] / quoted forms and after a bare single-token id (preserved via a &NEWLINE lookahead so a lone identifier stays a referenceable id). An unquoted multi-word title generates a synthetic id, matching existing quoted-only behavior.
  • Parser: handle the new subgraph_unquoted_label rule.
  • Release: bump workspace crates to v0.1.4 and update inter-crate dependency pins.

Tests

  • Added test_parse_subgraph_with_unquoted_multiword_label and test_parse_subgraph_bare_id_still_has_no_label.
  • Full workspace test suite passes.

🤖 Generated with Claude Code

cmwright and others added 2 commits June 12, 2026 12:14
Mermaid accepts a subgraph title written without quotes or brackets, e.g.
`subgraph Workflow Engine`. The grammar previously matched only the first
identifier and then failed on the remaining words.

Add an unquoted-label alternative to `subgraph_header`, ordered after the
explicit `id[label]` / quoted forms and after a bare single-token id (kept
via a `&NEWLINE` lookahead so a lone identifier stays a referenceable id).
An unquoted multi-word title generates a synthetic id, matching the
existing quoted-only behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump workspace crates to 0.1.4 and publish the fix landed since 0.1.3:

- Support unquoted multi-word subgraph titles (e.g. `subgraph Workflow Engine`)

Update inter-crate dependency pins (mermaid-core -> mermaid-dagre,
mermaid-rs-cli -> mermaid-core) to 0.1.4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cmwright
cmwright merged commit 743c998 into main Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant