Skip to content

Commit

Permalink
Fix syntax errors in patterns.md documentation (#2186)
Browse files Browse the repository at this point in the history
## Changes in `book/src/pil/patterns.md`:

1. Fixed array pattern syntax:
- Old: `[a, b, c`]
- New: `[a, b, c]`
Removed extra backtick that was causing incorrect code formatting.

- Ensuring proper Markdown rendering

The fixes help prevent confusion for readers learning about PIL patterns
and maintain documentation quality standards.
  • Loading branch information
donatik27 authored Dec 3, 2024
1 parent f11cf21 commit b2c0812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/src/pil/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A pattern is built up in from the following components:
- `-k` - for a literal number `k`, matches the exact negated number, either as an `int` or a `fe`
- `"text"` - for a string literal, matches the exact string literal as a `string`
- `(a, b, c)` - for a tuple, matches a tuple-typed value if all the components match
- `[a, b, c`] - for an array, matches array values of exactly the same length if all the components match
- `[a, b, c]` - for an array, matches array values of exactly the same length if all the components match
- `[a, .., b, c]` - matches an array that has an initial segment of `a` and ends in `b, c`. The omitted part can be empty.
- `X::Y(a, b)` - for an enum variant `X::Y`, matches that enum variant if all the enum fields match.

Expand Down Expand Up @@ -74,4 +74,4 @@ The following patterns are refutable:
- tuple patterns that have refutable components
- array patterns that are not `[..]`.

Variable patterns and `_` are always irrefutable.
Variable patterns and `_` are always irrefutable.

0 comments on commit b2c0812

Please sign in to comment.