@promptbook/remote-client
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
16 lines (15 loc) • 675 B
TypeScript
import type { string_markdown } from '../../types/typeAliases';
import type { string_markdown_text } from '../../types/typeAliases';
/**
* Utility function to extract all list items from markdown
*
* Note: It works with both ul and ol
* Note: It omits list items in code blocks
* Note: It flattens nested lists
* Note: It can not work with html syntax and comments
*
* @param markdown any valid markdown
* @returns An array of strings, each representing an individual list item found in the markdown
* @public exported from `@promptbook/markdown-utils`
*/
export declare function extractAllListItemsFromMarkdown(markdown: string_markdown): string_markdown_text[];