We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a1534b commit 710e3a8Copy full SHA for 710e3a8
utils/processMarkdownChunks.ts
@@ -215,10 +215,18 @@ export async function processMarkdownFile(filePath: string) {
215
visit(tree, (node: any) => {
216
switch (node.type) {
217
case 'heading':
218
- if (node.depth <= 2 && node.children?.[0]?.value) {
+ if (node.depth <= 3 && node.children?.[0]?.value) {
219
flushBuffer();
220
currentSection = node.children[0].value;
221
- // Don't create separate chunks for headings, just track them
+ chunks.push({
222
+ type: 'heading',
223
+ content: node.children[0].value,
224
+ metadata: {
225
+ section: currentSection,
226
+ sequence: sequence++,
227
+ depth: node.depth,
228
+ },
229
+ });
230
}
231
break;
232
0 commit comments