File tree 3 files changed +19
-3
lines changed
3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ license = "MIT"
11
11
url = " 2.4.1"
12
12
regex = " 1.10.5"
13
13
serde = { version = " 1.0.127" , features = [" derive" ] }
14
- unic-ucd-ident = { version = " 0.9.0 " , features = [ " id " ] }
14
+ unicode-id-start = " 1 "
15
15
16
16
[dev-dependencies ]
17
17
serde_json = " 1.0.66"
Original file line number Diff line number Diff line change @@ -1047,4 +1047,20 @@ mod tests {
1047
1047
. unwrap ( ) ;
1048
1048
assert ! ( pattern. has_regexp_groups( ) ) ;
1049
1049
}
1050
+
1051
+ #[ test]
1052
+ fn issue54 ( ) {
1053
+ let pattern = <UrlPattern >:: parse (
1054
+ UrlPatternInit {
1055
+ pathname : Some ( "/:thereisa\u{30FB} middledot." . to_owned ( ) ) ,
1056
+ ..Default :: default ( )
1057
+ } ,
1058
+ Default :: default ( ) ,
1059
+ )
1060
+ . unwrap ( ) ;
1061
+ assert_eq ! (
1062
+ pattern. pathname. group_name_list,
1063
+ vec![ "thereisa\u{30FB} middledot" ]
1064
+ ) ;
1065
+ }
1050
1066
}
Original file line number Diff line number Diff line change @@ -319,9 +319,9 @@ pub fn tokenize(
319
319
#[ inline]
320
320
pub ( crate ) fn is_valid_name_codepoint ( code_point : char , first : bool ) -> bool {
321
321
if first {
322
- unic_ucd_ident :: is_id_start ( code_point) || matches ! ( code_point, '$' | '_' )
322
+ unicode_id_start :: is_id_start ( code_point) || matches ! ( code_point, '$' | '_' )
323
323
} else {
324
- unic_ucd_ident :: is_id_continue ( code_point)
324
+ unicode_id_start :: is_id_continue ( code_point)
325
325
|| matches ! ( code_point, '$' | '\u{200C}' | '\u{200D}' )
326
326
}
327
327
}
You can’t perform that action at this time.
0 commit comments