Skip to content

Commit

Permalink
chore: fixed test test_reflow__sequence_rebreak_target
Browse files Browse the repository at this point in the history
  • Loading branch information
gvozdvmozgu authored and benfdking committed Feb 28, 2024
1 parent 190e86e commit 242d5cd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/lib/src/utils/reflow/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ impl ReflowSequence {
let post_idx =
all_raws.iter().position(|x| x == &target_raws[target_raws.len() - 1]).unwrap() + 1;

let initial_idx = (pre_idx, post_idx);

let mut pre_idx = pre_idx;
let mut post_idx = post_idx;

if sides == "both" || sides == "before" {
pre_idx -= 1;
for i in (0..pre_idx).rev() {
for i in (0..=pre_idx).rev() {
if all_raws[i].is_code() {
pre_idx = i;
break;
Expand Down

0 comments on commit 242d5cd

Please sign in to comment.