File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,8 @@ impl Atom {
171
171
let mut saw_backslash = false ;
172
172
for mut c in chars:: graphemes ( needle) {
173
173
if saw_backslash {
174
- if c == ' ' {
175
- needle_. push ( ' ' ) ;
174
+ if c. is_whitespace ( ) {
175
+ needle_. push ( c ) ;
176
176
saw_backslash = false ;
177
177
continue ;
178
178
} else {
Original file line number Diff line number Diff line change @@ -87,6 +87,9 @@ fn case_matching() {
87
87
fn escape ( ) {
88
88
let pat = Atom :: parse ( "foo\\ bar" , CaseMatching :: Smart , Normalization :: Smart ) ;
89
89
assert_eq ! ( pat. needle. to_string( ) , "foo bar" ) ;
90
+ // escaped double-width IDEOGRAPHIC SPACE
91
+ let pat = Atom :: parse ( "foo\\ bar" , CaseMatching :: Smart , Normalization :: Smart ) ;
92
+ assert_eq ! ( pat. needle. to_string( ) , "foo bar" ) ;
90
93
let pat = Atom :: parse ( "\\ !foo" , CaseMatching :: Smart , Normalization :: Smart ) ;
91
94
assert_eq ! ( pat. needle. to_string( ) , "!foo" ) ;
92
95
assert_eq ! ( pat. kind, AtomKind :: Fuzzy ) ;
You can’t perform that action at this time.
0 commit comments