Skip to content

Commit

Permalink
doc: fix tables of (non-)terminals (#743)
Browse files Browse the repository at this point in the history
For some reason, rustdoc does not recognize the table when it is
indented.  (This behavior seems to have changed between the 2.0
and 2.1 builds on docs.rs, while the markup stayed unchanged.)
  • Loading branch information
birkenfeld committed Nov 29, 2022
1 parent 40974ab commit 15c96e7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
46 changes: 23 additions & 23 deletions derive/src/lib.rs
Expand Up @@ -152,12 +152,12 @@
//!
//! 1. Terminals
//!
//! | Terminal | Usage |
//! |------------|----------------------------------------------------------------|
//! | `"a"` | matches the exact string `"a"` |
//! | `^"a"` | matches the exact string `"a"` case insensitively (ASCII only) |
//! | `'a'..'z'` | matches one character between `'a'` and `'z'` |
//! | `a` | matches rule `a` |
//! | Terminal | Usage |
//! |------------|----------------------------------------------------------------|
//! | `"a"` | matches the exact string `"a"` |
//! | `^"a"` | matches the exact string `"a"` case insensitively (ASCII only) |
//! | `'a'..'z'` | matches one character between `'a'` and `'z'` |
//! | `a` | matches rule `a` |
//!
//! Strings and characters follow
//! [Rust's escape mechanisms](https://doc.rust-lang.org/reference/tokens.html#byte-escapes), while
Expand All @@ -166,23 +166,23 @@
//!
//! 2. Non-terminals
//!
//! | Non-terminal | Usage |
//! |-----------------------|------------------------------------------------------------|
//! | `(e)` | matches `e` |
//! | `e1 ~ e2` | matches the sequence `e1` `e2` |
//! | <code>e1 \| e2</code> | matches either `e1` or `e2` |
//! | `e*` | matches `e` zero or more times |
//! | `e+` | matches `e` one or more times |
//! | `e{n}` | matches `e` exactly `n` times |
//! | `e{, n}` | matches `e` at most `n` times |
//! | `e{n,} ` | matches `e` at least `n` times |
//! | `e{m, n}` | matches `e` between `m` and `n` times inclusively |
//! | `e?` | optionally matches `e` |
//! | `&e` | matches `e` without making progress |
//! | `!e` | matches if `e` doesn't match without making progress |
//! | `PUSH(e)` | matches `e` and pushes it's captured string down the stack |
//!
//! where `e`, `e1`, and `e2` are expressions.
//! | Non-terminal | Usage |
//! |-----------------------|------------------------------------------------------------|
//! | `(e)` | matches `e` |
//! | `e1 ~ e2` | matches the sequence `e1` `e2` |
//! | <code>e1 \| e2</code> | matches either `e1` or `e2` |
//! | `e*` | matches `e` zero or more times |
//! | `e+` | matches `e` one or more times |
//! | `e{n}` | matches `e` exactly `n` times |
//! | `e{, n}` | matches `e` at most `n` times |
//! | `e{n,}` | matches `e` at least `n` times |
//! | `e{m, n}` | matches `e` between `m` and `n` times inclusively |
//! | `e?` | optionally matches `e` |
//! | `&e` | matches `e` without making progress |
//! | `!e` | matches if `e` doesn't match without making progress |
//! | `PUSH(e)` | matches `e` and pushes it's captured string down the stack |
//!
//! where `e`, `e1`, and `e2` are expressions.
//!
//! Expressions can modify the stack only if they match the input. For example,
//! if `e1` in the compound expression `e1 | e2` does not match the input, then
Expand Down
46 changes: 23 additions & 23 deletions pest/src/lib.rs
Expand Up @@ -165,12 +165,12 @@
//!
//! 1. Terminals
//!
//! | Terminal | Usage |
//! |------------|----------------------------------------------------------------|
//! | `"a"` | matches the exact string `"a"` |
//! | `^"a"` | matches the exact string `"a"` case insensitively (ASCII only) |
//! | `'a'..'z'` | matches one character between `'a'` and `'z'` |
//! | `a` | matches rule `a` |
//! | Terminal | Usage |
//! |------------|----------------------------------------------------------------|
//! | `"a"` | matches the exact string `"a"` |
//! | `^"a"` | matches the exact string `"a"` case insensitively (ASCII only) |
//! | `'a'..'z'` | matches one character between `'a'` and `'z'` |
//! | `a` | matches rule `a` |
//!
//! Strings and characters follow
//! [Rust's escape mechanisms](https://doc.rust-lang.org/reference/tokens.html#byte-escapes), while
Expand All @@ -179,23 +179,23 @@
//!
//! 2. Non-terminals
//!
//! | Non-terminal | Usage |
//! |-----------------------|------------------------------------------------------------|
//! | `(e)` | matches `e` |
//! | `e1 ~ e2` | matches the sequence `e1` `e2` |
//! | <code>e1 \| e2</code> | matches either `e1` or `e2` |
//! | `e*` | matches `e` zero or more times |
//! | `e+` | matches `e` one or more times |
//! | `e{n}` | matches `e` exactly `n` times |
//! | `e{, n}` | matches `e` at most `n` times |
//! | `e{n,} ` | matches `e` at least `n` times |
//! | `e{m, n}` | matches `e` between `m` and `n` times inclusively |
//! | `e?` | optionally matches `e` |
//! | `&e` | matches `e` without making progress |
//! | `!e` | matches if `e` doesn't match without making progress |
//! | `PUSH(e)` | matches `e` and pushes it's captured string down the stack |
//!
//! where `e`, `e1`, and `e2` are expressions.
//! | Non-terminal | Usage |
//! |-----------------------|------------------------------------------------------------|
//! | `(e)` | matches `e` |
//! | `e1 ~ e2` | matches the sequence `e1` `e2` |
//! | <code>e1 \| e2</code> | matches either `e1` or `e2` |
//! | `e*` | matches `e` zero or more times |
//! | `e+` | matches `e` one or more times |
//! | `e{n}` | matches `e` exactly `n` times |
//! | `e{, n}` | matches `e` at most `n` times |
//! | `e{n,}` | matches `e` at least `n` times |
//! | `e{m, n}` | matches `e` between `m` and `n` times inclusively |
//! | `e?` | optionally matches `e` |
//! | `&e` | matches `e` without making progress |
//! | `!e` | matches if `e` doesn't match without making progress |
//! | `PUSH(e)` | matches `e` and pushes it's captured string down the stack |
//!
//! where `e`, `e1`, and `e2` are expressions.
//!
//! Expressions can modify the stack only if they match the input. For example,
//! if `e1` in the compound expression `e1 | e2` does not match the input, then
Expand Down

0 comments on commit 15c96e7

Please sign in to comment.