convert_content

Function convert_content 

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

Converts Docusaurus markdown content to Quarto format.

Performs two main transformations:

  1. Frontmatter: Converts Docusaurus YAML frontmatter to Quarto format
  2. Admonitions: Converts Docusaurus-style admonitions (:::note) to Quarto callout blocks

The function uses a state machine to track whether it’s currently processing frontmatter (between — markers) or regular content.

§Arguments

  • content: The complete content of the markdown file as a string

§Returns

A new String containing the converted content in Quarto format