mdx_gen::extensionsFunction apply_syntax_highlighting
Source pub fn apply_syntax_highlighting(
code: &str,
lang: &str,
) -> Result<String, MarkdownError>
Expand description
Applies syntax highlighting to code blocks in the Markdown.
§Arguments
code
- The code block string to be highlighted.
lang
- The programming language of the code block.
§Returns
A Result
containing the HTML for the highlighted code or a MarkdownError
.