Skip to content

Commit bf7f8f1

Browse files
authoredJan 21, 2021
doc: use 'text' instead of 'ignore' for regexes
This makes rendering a bit nicer by disabling syntax highlighting and removing the "untested" warning. PR #741
1 parent 259863d commit bf7f8f1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
 

‎regex-syntax/src/utf8.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ whether a particular byte sequence was a Cyrillic character. One possible
1515
scalar value range is `[0400-04FF]`. The set of allowed bytes for this
1616
range can be expressed as a sequence of byte ranges:
1717
18-
```ignore
18+
```text
1919
[D0-D3][80-BF]
2020
```
2121
@@ -32,7 +32,7 @@ for example, `04FF` (because its last byte, `BF` isn't in the range `80-AF`).
3232
3333
Instead, you need multiple sequences of byte ranges:
3434
35-
```ignore
35+
```text
3636
[D0-D3][80-BF] # matches codepoints 0400-04FF
3737
[D4][80-AF] # matches codepoints 0500-052F
3838
```
@@ -41,7 +41,7 @@ This gets even more complicated if you want bigger ranges, particularly if
4141
they naively contain surrogate codepoints. For example, the sequence of byte
4242
ranges for the basic multilingual plane (`[0000-FFFF]`) look like this:
4343
44-
```ignore
44+
```text
4545
[0-7F]
4646
[C2-DF][80-BF]
4747
[E0][A0-BF][80-BF]
@@ -55,7 +55,7 @@ UTF-8, including encodings of surrogate codepoints.
5555
5656
And, of course, for all of Unicode (`[000000-10FFFF]`):
5757
58-
```ignore
58+
```text
5959
[0-7F]
6060
[C2-DF][80-BF]
6161
[E0][A0-BF][80-BF]
@@ -157,13 +157,13 @@ impl Utf8Sequence {
157157
///
158158
/// For example, if this corresponds to the following sequence:
159159
///
160-
/// ```ignore
160+
/// ```text
161161
/// [D0-D3][80-BF]
162162
/// ```
163163
///
164164
/// Then after reversal, it will be
165165
///
166-
/// ```ignore
166+
/// ```text
167167
/// [80-BF][D0-D3]
168168
/// ```
169169
///

‎src/re_set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $(#[$doc_regexset_example])*
4343
/// Note that it would be possible to adapt the above example to using `Regex`
4444
/// with an expression like:
4545
///
46-
/// ```ignore
46+
/// ```text
4747
/// (?P<email>[a-z]+@(?P<email_domain>[a-z]+[.](com|org|net)))|(?P<domain>[a-z]+[.](com|org|net))
4848
/// ```
4949
///

0 commit comments

Comments
 (0)
Please sign in to comment.