Skip to content

@sqlrooms/ai-core / markdownToPlainText

Function: markdownToPlainText()

markdownToPlainText(markdown, excludedTagNames?): string

Extracts the sanitized text projection used by chat search. Subtrees rooted at excludedTagNames become non-searchable boundaries so opaque custom Markdown renderers cannot contribute text or join searchable text across content they may replace or hide.

Parameters

ParameterTypeDefault value
markdownstringundefined
excludedTagNamesreadonly string[][]

Returns

string