Skip to content

Commit

Permalink
fix isssue of danlging comma
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 authored Jul 11, 2024
1 parent 9587e9e commit a377622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/src/inline_snippets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ fn delete_hanging_comma(
if Some(&index) != next_comma {
result.push(c);
} else {
next_comma = to_delete.next();
// Keep track of ranges we need to expand into, since we deleted code in the range
// This isn't perfect, but it's good enough for tracking cell boundaries
for (range, ..) in replacement_ranges.iter_mut().rev() {
Expand All @@ -362,7 +363,6 @@ fn delete_hanging_comma(
}
}
ranges_updates = update_range_shifts(index + offset, &ranges_updates, &ranges);
next_comma = to_delete.next();
}
}

Expand Down

0 comments on commit a377622

Please sign in to comment.