Skip to content

Commit d2d85b4

Browse files
committed
Cover nested lists in the e2e fixture
Add all four parent/child list nestings (bullet>bullet, bullet>number, number>bullet, number>number) to the fixture and regenerate the golden. Verified Substack stores the nested structure intact on round-trip.
1 parent 1e18ff3 commit d2d85b4

2 files changed

Lines changed: 212 additions & 0 deletions

File tree

‎tests/substack/fixtures/full_features.expected.json‎

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,204 @@
274274
}
275275
]
276276
},
277+
{
278+
"type": "bullet_list",
279+
"content": [
280+
{
281+
"type": "list_item",
282+
"content": [
283+
{
284+
"type": "paragraph",
285+
"content": [
286+
{
287+
"type": "text",
288+
"text": "Bulleted list with a nested bulleted list:"
289+
}
290+
]
291+
},
292+
{
293+
"type": "bullet_list",
294+
"content": [
295+
{
296+
"type": "list_item",
297+
"content": [
298+
{
299+
"type": "paragraph",
300+
"content": [
301+
{
302+
"type": "text",
303+
"text": "inner bullet a"
304+
}
305+
]
306+
}
307+
]
308+
},
309+
{
310+
"type": "list_item",
311+
"content": [
312+
{
313+
"type": "paragraph",
314+
"content": [
315+
{
316+
"type": "text",
317+
"text": "inner bullet b"
318+
}
319+
]
320+
}
321+
]
322+
}
323+
]
324+
}
325+
]
326+
},
327+
{
328+
"type": "list_item",
329+
"content": [
330+
{
331+
"type": "paragraph",
332+
"content": [
333+
{
334+
"type": "text",
335+
"text": "Bulleted list with a nested numbered list:"
336+
}
337+
]
338+
},
339+
{
340+
"type": "ordered_list",
341+
"content": [
342+
{
343+
"type": "list_item",
344+
"content": [
345+
{
346+
"type": "paragraph",
347+
"content": [
348+
{
349+
"type": "text",
350+
"text": "inner number a"
351+
}
352+
]
353+
}
354+
]
355+
},
356+
{
357+
"type": "list_item",
358+
"content": [
359+
{
360+
"type": "paragraph",
361+
"content": [
362+
{
363+
"type": "text",
364+
"text": "inner number b"
365+
}
366+
]
367+
}
368+
]
369+
}
370+
]
371+
}
372+
]
373+
}
374+
]
375+
},
376+
{
377+
"type": "ordered_list",
378+
"content": [
379+
{
380+
"type": "list_item",
381+
"content": [
382+
{
383+
"type": "paragraph",
384+
"content": [
385+
{
386+
"type": "text",
387+
"text": "Numbered list with a nested bulleted list:"
388+
}
389+
]
390+
},
391+
{
392+
"type": "bullet_list",
393+
"content": [
394+
{
395+
"type": "list_item",
396+
"content": [
397+
{
398+
"type": "paragraph",
399+
"content": [
400+
{
401+
"type": "text",
402+
"text": "inner bullet a"
403+
}
404+
]
405+
}
406+
]
407+
},
408+
{
409+
"type": "list_item",
410+
"content": [
411+
{
412+
"type": "paragraph",
413+
"content": [
414+
{
415+
"type": "text",
416+
"text": "inner bullet b"
417+
}
418+
]
419+
}
420+
]
421+
}
422+
]
423+
}
424+
]
425+
},
426+
{
427+
"type": "list_item",
428+
"content": [
429+
{
430+
"type": "paragraph",
431+
"content": [
432+
{
433+
"type": "text",
434+
"text": "Numbered list with a nested numbered list:"
435+
}
436+
]
437+
},
438+
{
439+
"type": "ordered_list",
440+
"content": [
441+
{
442+
"type": "list_item",
443+
"content": [
444+
{
445+
"type": "paragraph",
446+
"content": [
447+
{
448+
"type": "text",
449+
"text": "inner number a"
450+
}
451+
]
452+
}
453+
]
454+
},
455+
{
456+
"type": "list_item",
457+
"content": [
458+
{
459+
"type": "paragraph",
460+
"content": [
461+
{
462+
"type": "text",
463+
"text": "inner number b"
464+
}
465+
]
466+
}
467+
]
468+
}
469+
]
470+
}
471+
]
472+
}
473+
]
474+
},
277475
{
278476
"type": "blockquote",
279477
"content": [

‎tests/substack/fixtures/full_features.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ A sentence with a numeric footnote[^1] and a named footnote[^note], plus a repea
2020
1. Ordered one
2121
2. Ordered two
2222

23+
- Bulleted list with a nested bulleted list:
24+
- inner bullet a
25+
- inner bullet b
26+
- Bulleted list with a nested numbered list:
27+
1. inner number a
28+
2. inner number b
29+
30+
1. Numbered list with a nested bulleted list:
31+
- inner bullet a
32+
- inner bullet b
33+
2. Numbered list with a nested numbered list:
34+
1. inner number a
35+
2. inner number b
36+
2337
> A blockquote across
2438
> two wrapped lines.
2539

0 commit comments

Comments
 (0)