Skip to content

Commit

Permalink
Added spaces to wrap wide columns
Browse files Browse the repository at this point in the history
This stops the comments field from requiring horizontal scrolling to read.
This cannot be zero width spaces since that breaks when the link is
hovered.
  • Loading branch information
tbelaire authored and Geal committed May 19, 2018
1 parent f8f6248 commit 0004181
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/choosing_a_combinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Those are used to recognize the lowest level elements of your grammar, like, "he
| [take_while](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_while.html) |`take_while!(is_alphabetic)` | `"abc123"` | `Ok( ("123", "abc") )`| returns the longest list of bytes for which the provided function returns true. `take_while1` does the same, but must return at least one character|
| [take_till](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_till.html) |`take_till!(is_alphabetic)` | `"123abc"` | `Ok( ("abc", "123) )`|returns the longest list of bytes or characters until the provided function returns true. `take_till1` does the same, but must return at least one character. This is the reverse behaviour from `take_while`: `take_till!(f)` is equivalent to `take_while!(|c| !f(c))`|
|[take_until](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_until.html) | `take_until!("world")` | `"Hello world"` | `Ok( ("world", "Hello ") )`|returns the longest list of bytes or characters until the provided tag is found. `take_until1` does the same, but must return at least one character|
|[take_until_and_consume](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_until_and_consume.html) | `take_until_and_consume!("world")` | `"Hello world!"` | `Ok( ("!", "Hello ") )`| same as `take_until` but consumes the tag. `take_until_and_consume1` does the same, but must return at least one character|
|[take_until_ and_consume](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_until_and_consume.html) | `take_until_and_consume!("world")` | `"Hello world!"` | `Ok( ("!", "Hello ") )`| same as `take_until` but consumes the tag. `take_until_and_consume1` does the same, but must return at least one character|
| [take_until_either](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_until_either.html) |`take_until_either!` | `` | ``|DEPRECATED? returns the longest list of bytes until any of the provided characters are found|
| [take_until_either_and_consume](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_until_either_and_consume.html) |`take_until_either_and_consume` | `` | ``|DEPRECATED? same as take_until_either!, but consumes the terminating character|
| [take_until_ either_and_consume](https://docs.rs/nom/4.0.0-alpha2/nom/macro.take_until_either_and_consume.html) |`take_until_either_and_consume` | `` | ``|DEPRECATED? same as take_until_either!, but consumes the terminating character|
|[value](https://docs.rs/nom/4.0.0-alpha2/nom/macro.value.html) | `value!(42, tag!("abcd"))` |`"abcdef"` | `Ok( ("ef", 42) )`|replaces the result of the child parser with the provided value. Can also be used without a child parser. `value!(42)` would return the `42` value without consuming the input|


Expand Down

0 comments on commit 0004181

Please sign in to comment.