UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

31 lines (30 loc) 1.08 kB
/** * Cache for storing processed content to avoid redundant processing */ export declare const contentCache: Map<string, string>; /** * Adds content to the cache with size limitation * Removes oldest entry if cache size limit is reached * * @param key The cache key * @param value The processed content to store */ export declare const addToCache: (key: string, value: string) => void; /** * Transforms citation references in the format [n] to markdown links * * @param rawContent The markdown content with citation references * @param length The number of citations * @returns The content with citations transformed to markdown links */ export declare const transformCitations: (rawContent: string, length?: number) => string; /** * Preprocessing options for markdown content */ interface PreprocessOptions { citationsLength?: number; enableCustomFootnotes?: boolean; enableLatex?: boolean; } export declare const preprocessMarkdownContent: (str: string, { enableCustomFootnotes, enableLatex, citationsLength }?: PreprocessOptions) => string; export {};