| 184 | const processorCache = new ProcessorCache(); |
| 185 | |
| 186 | export const Markdown = (options: Readonly<Options>) => { |
| 187 | const processor = getCachedProcessor(options); |
| 188 | const content = options.children || ""; |
| 189 | // biome-ignore lint/suspicious/noExplicitAny: runSync return type varies with processor configuration |
| 190 | const tree = processor.runSync(processor.parse(content), content) as any; |
| 191 | return post(tree, options); |
| 192 | }; |
| 193 | |
| 194 | const getCachedProcessor = (options: Readonly<Options>) => { |
| 195 | // Try to get from cache first |