@@ -188,15 +188,15 @@ mod parser {
188
188
// - Update `is_ignore_char` to make sure `sep1` doesn't eat it all up
189
189
// - Make sure you always consume it
190
190
terminated ( uuid_literal, peek ( sep1) ) ,
191
- terminated ( hash_literal, peek ( sep1) ) ,
191
+ terminated ( email_literal, peek ( sep1) ) ,
192
+ terminated ( url_literal, peek ( sep1) ) ,
193
+ terminated ( jwt, peek ( sep1) ) ,
192
194
terminated ( base64_literal, peek ( sep1) ) , // base64 should be quoted or something
195
+ terminated ( hash_literal, peek ( sep1) ) ,
193
196
terminated ( ordinal_literal, peek ( sep1) ) ,
194
197
terminated ( hex_literal, peek ( sep1) ) ,
195
198
terminated ( dec_literal, peek ( sep1) ) , // Allow digit-prefixed words
196
- terminated ( email_literal, peek ( sep1) ) ,
197
- terminated ( url_literal, peek ( sep1) ) ,
198
199
terminated ( css_color, peek ( sep1) ) ,
199
- terminated ( jwt, peek ( sep1) ) ,
200
200
c_escape,
201
201
printf,
202
202
other,
@@ -1653,7 +1653,7 @@ mod test {
1653
1653
fn tokenize_ignore_email ( ) {
1654
1654
let parser = TokenizerBuilder :: new ( ) . build ( ) ;
1655
1655
1656
- let input =
"Good [email protected] Bye" ;
1656
+ let input =
"Good [email protected] if=@nam iff=@nam Bye" ;
1657
1657
let actual: Vec < _ > = parser. parse_bytes ( input. as_bytes ( ) ) . collect ( ) ;
1658
1658
assert_data_eq ! (
1659
1659
actual. to_debug( ) ,
@@ -1667,7 +1667,7 @@ mod test {
1667
1667
Identifier {
1668
1668
token: "Bye",
1669
1669
case: None,
1670
- offset: 25 ,
1670
+ offset: 42 ,
1671
1671
},
1672
1672
]
1673
1673
@@ -1686,7 +1686,7 @@ mod test {
1686
1686
Identifier {
1687
1687
token: "Bye",
1688
1688
case: None,
1689
- offset: 25 ,
1689
+ offset: 42 ,
1690
1690
},
1691
1691
]
1692
1692
0 commit comments