mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
feat(lists): alternate markdown list markers by nesting depth
Ordered lists switch between `1.` (even depth) and `A.` (odd depth). Unordered lists switch between `-` (even depth) and `*` (odd depth). Makes nested list structure visually distinct in extracted text.
This commit is contained in:
@@ -334,8 +334,8 @@ describe("HTMLTextSplitter", () => {
|
||||
const html = [
|
||||
'<pre class="list-markdown">',
|
||||
"1. First",
|
||||
" 1. Nested 1",
|
||||
" 2. Nested 2",
|
||||
" A. Nested 1",
|
||||
" B. Nested 2",
|
||||
"2. Second",
|
||||
"</pre>",
|
||||
].join("\n");
|
||||
@@ -343,7 +343,7 @@ describe("HTMLTextSplitter", () => {
|
||||
const chunks = await splitter.splitText(html);
|
||||
|
||||
expect(chunks).toEqual([
|
||||
"1. First\n 1. Nested 1\n 2. Nested 2\n2. Second",
|
||||
"1. First\n A. Nested 1\n B. Nested 2\n2. Second",
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user