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.
Extends
Section titled “Extends”FileReader
<Document
>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MarkdownReader(
removeHyperlinks?
,removeImages?
):MarkdownReader
Defined in: .build/typescript/packages/readers/src/markdown.ts:17
Parameters
Section titled “Parameters”removeHyperlinks?
Section titled “removeHyperlinks?”boolean
= true
Indicates whether hyperlinks should be removed.
removeImages?
Section titled “removeImages?”boolean
= true
Indicates whether images should be removed.
Returns
Section titled “Returns”MarkdownReader
Overrides
Section titled “Overrides”FileReader<Document>.constructor
Methods
Section titled “Methods”markdownToTups()
Section titled “markdownToTups()”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.
Parameters
Section titled “Parameters”markdownText
Section titled “markdownText”string
The markdown text to convert.
Returns
Section titled “Returns”MarkdownTuple
[]
- An array of tuples, where each tuple contains a header (or null) and its corresponding text.
removeImages()
Section titled “removeImages()”removeImages(
content
):string
Defined in: .build/typescript/packages/readers/src/markdown.ts:70
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
removeHyperlinks()
Section titled “removeHyperlinks()”removeHyperlinks(
content
):string
Defined in: .build/typescript/packages/readers/src/markdown.ts:75
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
parseTups()
Section titled “parseTups()”parseTups(
content
):MarkdownTuple
[]
Defined in: .build/typescript/packages/readers/src/markdown.ts:80
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”MarkdownTuple
[]
loadDataAsContent()
Section titled “loadDataAsContent()”loadDataAsContent(
fileContent
):Promise
<Document
<Metadata
>[]>
Defined in: .build/typescript/packages/readers/src/markdown.ts:91
Parameters
Section titled “Parameters”fileContent
Section titled “fileContent”Uint8Array
Returns
Section titled “Returns”Promise
<Document
<Metadata
>[]>
Overrides
Section titled “Overrides”FileReader.loadDataAsContent