Skip to content

Commit

Permalink
doc: use 'text' instead of 'ignore' for regexes
Browse files Browse the repository at this point in the history
This makes rendering a bit nicer by disabling syntax
highlighting and removing the "untested" warning.

PR #741
  • Loading branch information
markusolt authored Jan 21, 2021
1 parent 259863d commit bf7f8f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit bf7f8f1

Please sign in to comment.