Creates a MarkdownParser that delegates to the marked library's parse function.
marked
parse
The consumer must install marked themselves and pass in the bound parse function — this library never imports marked directly.
A function that takes a Markdown string and returns an HTML string. Typically (md) => marked.parse(md).
(md) => marked.parse(md)
A MarkdownParser instance.
import { marked } from 'marked';import { MARKDOWN_PARSER, createMarkedParser } from '@theredhead/lucid-kit';providers: [ { provide: MARKDOWN_PARSER, useValue: createMarkedParser(md => marked.parse(md) as string), },] Copy
import { marked } from 'marked';import { MARKDOWN_PARSER, createMarkedParser } from '@theredhead/lucid-kit';providers: [ { provide: MARKDOWN_PARSER, useValue: createMarkedParser(md => marked.parse(md) as string), },]
Creates a MarkdownParser that delegates to the
markedlibrary'sparsefunction.The consumer must install
markedthemselves and pass in the boundparsefunction — this library never importsmarkeddirectly.