@promptbook/openai
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
15 lines (14 loc) • 628 B
TypeScript
import type { string_markdown, 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[];