We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
split_at
1 parent 375d9c2 commit 4515818Copy full SHA for 4515818
src/magic_string/mod.rs
@@ -240,6 +240,9 @@ impl<'text> MagicString<'text> {
240
let second_half_idx = self.chunks.push(second_half_chunk);
241
let first_half_idx = candidate_idx;
242
243
+ // Update the last searched chunk
244
+ self.last_searched_chunk_idx = first_half_idx;
245
+
246
// Update the chunk_by_start/end maps
247
self.chunk_by_end.insert(at_index, first_half_idx);
248
self.chunk_by_start.insert(at_index, second_half_idx);
0 commit comments