Skip to content

Commit 3d394f6

Browse files
committed
Use correct node span from the next node
1 parent 84a6bd7 commit 3d394f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkgs/yaml_edit/lib/src/list_mutations.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ SourceEdit _removeFromBlockList(
332332

333333
final hyphenOffset = yaml.lastIndexOf(
334334
'-',
335-
span.length == 0 ? offset : offset - 1,
335+
nextNodeSpan.length == 0 ? offset : offset - 1,
336336
);
337337

338338
final nearestLineEnding = yaml.lastIndexOf('\n', hyphenOffset);

0 commit comments

Comments
 (0)