mdx_gen::extensions

Function process_custom_blocks

Source
pub fn process_custom_blocks(content: &str) -> String
Expand description

Processes custom blocks in the Markdown content, such as note, warning, tip, info, important, and caution blocks. These custom blocks are represented by div elements with specific class names. The function replaces these div elements with corresponding Bootstrap alert elements.

§Arguments

  • content - A string containing the Markdown content.

§Returns

A string containing the processed Markdown content with custom blocks replaced by Bootstrap alert elements.