Skip to content

MarkdownReader

Defined in: .build/typescript/packages/readers/src/markdown.ts:9

Extract text from markdown files. Returns dictionary with keys as headers and values as the text between headers.

  • FileReader<Document>

new MarkdownReader(removeHyperlinks?, removeImages?): MarkdownReader

Defined in: .build/typescript/packages/readers/src/markdown.ts:17

boolean = true

Indicates whether hyperlinks should be removed.

boolean = true

Indicates whether images should be removed.

MarkdownReader

FileReader<Document>.constructor

markdownToTups(markdownText): MarkdownTuple[]

Defined in: .build/typescript/packages/readers/src/markdown.ts:29

Convert a markdown file to a dictionary. The keys are the headers and the values are the text under each header.

string

The markdown text to convert.

MarkdownTuple[]

  • An array of tuples, where each tuple contains a header (or null) and its corresponding text.

removeImages(content): string

Defined in: .build/typescript/packages/readers/src/markdown.ts:70

string

string


removeHyperlinks(content): string

Defined in: .build/typescript/packages/readers/src/markdown.ts:75

string

string


parseTups(content): MarkdownTuple[]

Defined in: .build/typescript/packages/readers/src/markdown.ts:80

string

MarkdownTuple[]


loadDataAsContent(fileContent): Promise<Document<Metadata>[]>

Defined in: .build/typescript/packages/readers/src/markdown.ts:91

Uint8Array

Promise<Document<Metadata>[]>

FileReader.loadDataAsContent