From 640bfa762d6ef87678c110599744492f03def80c Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sun, 21 Feb 2016 06:36:44 -0500 Subject: [PATCH] Update old documentation for #172. --- regex-syntax/src/lib.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/regex-syntax/src/lib.rs b/regex-syntax/src/lib.rs index c84f18c..3a77bd3 100644 --- a/regex-syntax/src/lib.rs +++ b/regex-syntax/src/lib.rs @@ -194,12 +194,9 @@ pub enum Repeater { /// sequence of non-overlapping ranges. This makes it possible to test whether /// a character is matched by a class with a binary search. /// -/// Additionally, a character class may be marked *case insensitive*. If it's -/// case insensitive, then: -/// -/// 1. Simple case folding has been applied to all ranges. -/// 2. Simple case folding must be applied to a character before testing -/// whether it matches the character class. +/// If the case insensitive flag was set when parsing a character class, then +/// simple case folding is done automatically. For example, `(?i)[a-c]` is +/// automatically translated to `[a-cA-C]`. #[derive(Clone, Debug, PartialEq, Eq)] pub struct CharClass { ranges: Vec, @@ -375,8 +372,6 @@ impl CharClass { } /// Create a new empty class from this one. - /// - /// Namely, its capacity and case insensitive setting will be the same. fn to_empty(&self) -> CharClass { CharClass { ranges: Vec::with_capacity(self.len()) } }