pub fn process_markdown(
content: &str,
options: &MarkdownOptions<'_>,
) -> Result<String, MarkdownError>Expand description
Processes the input Markdown content and converts it into HTML.
The pipeline:
- Validate options and check resource limits.
- Parse Markdown to a comrak AST.
- (Optional) Transform custom-block
HtmlBlocknodes in the AST. - Render to HTML, using comrakâs syntax-highlighting plugin.
- (Optional) Enhance tables with responsive wrappers.
- (Optional) Sanitize HTML when
allow_unsafe_htmlisfalse.