Skip to content

diagram: replace ; in sequenceDiagram message and note text - #64

Merged
benjaminjones merged 1 commit into
mainfrom
fix/mermaid-sequence-statement-separator
Oct 9, 2026
Merged

benjaminjones merged 1 commit into
mainfrom
fix/mermaid-sequence-statement-separator

Conversation

@benjaminjones

Copy link
Copy Markdown
Owner

A semicolon separates statements in Mermaid, and sequence message text is unquoted — so
A->>B: one thing; another parses as two statements and the whole block fails to render, with the
second half's first word read as an actor.

Follows #63. Same underlying class — generated prose landing in a position where Mermaid has a
metacharacter — in a different grammar.

Scope. Sequence blocks only. A flowchart label is quoted, so a ; there is safe; rewriting it
would change prose to fix a problem that grammar does not have. Verified both ways.

An em dash, not &#59;. The entity does make the block parse, but it renders literally as &;
— readable-but-wrong, which is worse than a clear substitution. A semicolon in this prose always
joins two clauses.

7 tests, including that a clean block comes back byte-identical, that a colon inside the message
text is not treated as the boundary (file:line citations are common there), and that a participant
declaration is not mistaken for a message. 361 passing.

🤖 Generated with Claude Code

A semicolon separates statements in Mermaid, and sequence message text is unquoted — so
`A->>B: one thing; another` parses as two statements and the block fails to render, with the
second half's first word read as an actor.

Scoped to sequence blocks. A flowchart label is quoted, so a `;` there is safe; rewriting it
would change prose to fix a problem that grammar does not have.

An em dash rather than `&#59;`: the entity does make the block parse, but it renders literally
as `&;`, which is readable-but-wrong and worse than a clear substitution. A semicolon in this
prose always joins two clauses.

7 tests, including that a clean block is returned byte-identical, that a colon inside the text is
not treated as the boundary, and that a participant declaration is not mistaken for a message.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@benjaminjones
benjaminjones merged commit 416963c into main Oct 9, 2026
4 checks passed
@benjaminjones
benjaminjones deleted the fix/mermaid-sequence-statement-separator branch October 9, 2026 18:57
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