Skip to content

doc: Use "text" instead of "ignore" attribute for regex examples #741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions regex-syntax/src/utf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ whether a particular byte sequence was a Cyrillic character. One possible
scalar value range is `[0400-04FF]`. The set of allowed bytes for this
range can be expressed as a sequence of byte ranges:

```ignore
```text
[D0-D3][80-BF]
```

Expand All @@ -32,7 +32,7 @@ for example, `04FF` (because its last byte, `BF` isn't in the range `80-AF`).

Instead, you need multiple sequences of byte ranges:

```ignore
```text
[D0-D3][80-BF] # matches codepoints 0400-04FF
[D4][80-AF] # matches codepoints 0500-052F
```
Expand All @@ -41,7 +41,7 @@ This gets even more complicated if you want bigger ranges, particularly if
they naively contain surrogate codepoints. For example, the sequence of byte
ranges for the basic multilingual plane (`[0000-FFFF]`) look like this:

```ignore
```text
[0-7F]
[C2-DF][80-BF]
[E0][A0-BF][80-BF]
Expand All @@ -55,7 +55,7 @@ UTF-8, including encodings of surrogate codepoints.

And, of course, for all of Unicode (`[000000-10FFFF]`):

```ignore
```text
[0-7F]
[C2-DF][80-BF]
[E0][A0-BF][80-BF]
Expand Down Expand Up @@ -157,13 +157,13 @@ impl Utf8Sequence {
///
/// For example, if this corresponds to the following sequence:
///
/// ```ignore
/// ```text
/// [D0-D3][80-BF]
/// ```
///
/// Then after reversal, it will be
///
/// ```ignore
/// ```text
/// [80-BF][D0-D3]
/// ```
///
Expand Down
2 changes: 1 addition & 1 deletion src/re_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $(#[$doc_regexset_example])*
/// Note that it would be possible to adapt the above example to using `Regex`
/// with an expression like:
///
/// ```ignore
/// ```text
/// (?P<email>[a-z]+@(?P<email_domain>[a-z]+[.](com|org|net)))|(?P<domain>[a-z]+[.](com|org|net))
/// ```
///
Expand Down