From 5a02f2bddae6972fdb62ee5b3333d102fb0cb1dd Mon Sep 17 00:00:00 2001 From: Erik Beuschau Date: Wed, 21 Jan 2026 14:58:28 +0100 Subject: [PATCH] Add titles when possible --- proxy/bin/combineContent.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/proxy/bin/combineContent.ts b/proxy/bin/combineContent.ts index ad94a008..d12cd4df 100644 --- a/proxy/bin/combineContent.ts +++ b/proxy/bin/combineContent.ts @@ -40,6 +40,13 @@ interface MarkdownContent { tokens?: MarkdownContent[] items?: MarkdownContent[] id?: string + title?: { + tokens?: MarkdownContent[] + raw: string + text: string + type: string + depth: number + } } enum ContentType { @@ -58,6 +65,7 @@ enum ContentType { interface ContentEntry { type: ContentType + title?: string text?: string anchor?: string tokens?: ContentEntry[] @@ -159,6 +167,7 @@ function mapMarkdownToContentEntry( const mapped: ContentEntry = { type: item.type as ContentType, text: item.text, + title: item.title?.text, tokens: tokens.length > 0 ? tokens : undefined, anchor: item.id ? `#${item.id}` : undefined, }