File tree 2 files changed +13
-3
lines changed
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -167,11 +167,13 @@ impl<'a> ConstructorStringParser<'a> {
167
167
assert ! ( self . token_index < self . token_list. len( ) ) ;
168
168
let token = & self . token_list [ self . token_index ] ;
169
169
let component_start_index = self . get_safe_token ( self . component_start ) . index ;
170
+
170
171
self
171
172
. input
172
- . get ( component_start_index..token. index ) // TODO: check & codepoint
173
- . unwrap ( )
174
- . to_string ( )
173
+ . chars ( )
174
+ . skip ( component_start_index)
175
+ . take ( token. index - component_start_index)
176
+ . collect ( )
175
177
}
176
178
177
179
// Ref: https://wicg.github.io/urlpattern/#rewind-and-set-state
Original file line number Diff line number Diff line change @@ -833,4 +833,12 @@ mod tests {
833
833
} )
834
834
. unwrap ( ) ;
835
835
}
836
+
837
+ #[ test]
838
+ fn issue46 ( ) {
839
+ quirks:: process_construct_pattern_input (
840
+ quirks:: StringOrInit :: String ( ":café://:foo" . to_owned ( ) ) ,
841
+ None ,
842
+ ) . unwrap ( ) ;
843
+ }
836
844
}
You can’t perform that action at this time.
0 commit comments