From 15c96e7c1981578221c9e22cf109d8cf447742df Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 29 Nov 2022 15:51:43 +0100 Subject: [PATCH] doc: fix tables of (non-)terminals (#743) 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.) --- derive/src/lib.rs | 46 +++++++++++++++++++++++----------------------- pest/src/lib.rs | 46 +++++++++++++++++++++++----------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/derive/src/lib.rs b/derive/src/lib.rs index feccc3a7..8fa5038b 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -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 @@ -166,23 +166,23 @@ //! //! 2. Non-terminals //! -//! | Non-terminal | Usage | -//! |-----------------------|------------------------------------------------------------| -//! | `(e)` | matches `e` | -//! | `e1 ~ e2` | matches the sequence `e1` `e2` | -//! | e1 \| e2 | 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` | +//! | e1 \| e2 | 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 diff --git a/pest/src/lib.rs b/pest/src/lib.rs index 47d82f14..6ff38670 100644 --- a/pest/src/lib.rs +++ b/pest/src/lib.rs @@ -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 @@ -179,23 +179,23 @@ //! //! 2. Non-terminals //! -//! | Non-terminal | Usage | -//! |-----------------------|------------------------------------------------------------| -//! | `(e)` | matches `e` | -//! | `e1 ~ e2` | matches the sequence `e1` `e2` | -//! | e1 \| e2 | 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` | +//! | e1 \| e2 | 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