Skip to content

Commit e06c2c8

Browse files
committed
test: added test for list items with a reverse staircase selection
1 parent 1ba2b41 commit e06c2c8

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/extensions/markdown/Lists/commands.test.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,39 @@ describe('sinkOnlySelectedListItem', () => {
232232
),
233233
),
234234
));
235+
it('sinks nested list items with a reverse staircase selection from outdented item to indented one', () =>
236+
apply(
237+
doc(
238+
ul(
239+
li(p('aa')),
240+
li(
241+
p('bb'),
242+
ul(
243+
li(p('cc')),
244+
li(p('dd'), ul(li(p('ee')), li(p('s<a>s')))),
245+
li(p('z<b>z')),
246+
li(p('ww')),
247+
),
248+
),
249+
li(p('pp')),
250+
li(p('hh')),
251+
),
252+
),
253+
sink,
254+
doc(
255+
ul(
256+
li(p('aa')),
257+
li(
258+
p('bb'),
259+
ul(
260+
li(p('cc')),
261+
li(p('dd'), ul(li(p('ee'), ul(li(p('ss')))), li(p('zz')))),
262+
li(p('ww')),
263+
),
264+
),
265+
li(p('pp')),
266+
li(p('hh')),
267+
),
268+
),
269+
));
235270
});

0 commit comments

Comments
 (0)