@promptbook/remote-server
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
16 lines (15 loc) • 635 B
TypeScript
import type { string_markdown, string_markdown_text } from '../../types/string_markdown';
/**
* 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[];