Skip to content

Commit 640bfa7

Browse files
committed
Update old documentation for #172.
1 parent 4466bb7 commit 640bfa7

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

regex-syntax/src/lib.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,9 @@ pub enum Repeater {
194194
/// sequence of non-overlapping ranges. This makes it possible to test whether
195195
/// a character is matched by a class with a binary search.
196196
///
197-
/// Additionally, a character class may be marked *case insensitive*. If it's
198-
/// case insensitive, then:
199-
///
200-
/// 1. Simple case folding has been applied to all ranges.
201-
/// 2. Simple case folding must be applied to a character before testing
202-
/// whether it matches the character class.
197+
/// If the case insensitive flag was set when parsing a character class, then
198+
/// simple case folding is done automatically. For example, `(?i)[a-c]` is
199+
/// automatically translated to `[a-cA-C]`.
203200
#[derive(Clone, Debug, PartialEq, Eq)]
204201
pub struct CharClass {
205202
ranges: Vec<ClassRange>,
@@ -375,8 +372,6 @@ impl CharClass {
375372
}
376373

377374
/// Create a new empty class from this one.
378-
///
379-
/// Namely, its capacity and case insensitive setting will be the same.
380375
fn to_empty(&self) -> CharClass {
381376
CharClass { ranges: Vec::with_capacity(self.len()) }
382377
}

0 commit comments

Comments
 (0)