Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions proxy/bin/combineContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -58,6 +65,7 @@ enum ContentType {

interface ContentEntry {
type: ContentType
title?: string
text?: string
anchor?: string
tokens?: ContentEntry[]
Expand Down Expand Up @@ -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,
}
Expand Down
Loading