Skip to content

Comments

Fix formatting of markdown grammar with cut#2183

Open
ehuss wants to merge 1 commit intorust-lang:masterfrom
ehuss:fix-cut-break
Open

Fix formatting of markdown grammar with cut#2183
ehuss wants to merge 1 commit intorust-lang:masterfrom
ehuss:fix-cut-break

Conversation

@ehuss
Copy link
Contributor

@ehuss ehuss commented Feb 19, 2026

This fixes a formatting issue with how the grammar is rendered in markdown when there is a cut operator. The Alt renderer was incorrectly missing a space on alternations that span multiple lines with a cut operator. This is because the Cut expression is essentially the same as a sequence, but the last_expr function was not treating it that way. The Cut was preventing it from seeing that the alternation had a Break at the end.

This fixes a formatting issue with how the grammar is rendered in
markdown when there is a cut operator. The Alt renderer was incorrectly
missing a space on alternations that span multiple lines with a cut
operator. This is because the Cut expression is essentially the same as
a sequence, but the `last_expr` function was not treating it that way.
The Cut was preventing it from seeing that the alternation had a Break
at the end.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants