update_markdown_file

Function update_markdown_file 

Source
pub fn update_markdown_file(
    input_filepath: &Path,
    output_filepath: Option<&Path>,
    verbose: bool,
    backtick_standardize: bool,
    execute: bool,
    standardize: bool,
) -> Result<()>
Expand description

Update a Markdown file by executing code blocks and inserting their output.

§Arguments

  • input_filepath - Path to the input Markdown file
  • output_filepath - Optional path to the output file (defaults to overwriting input)
  • verbose - Enable verbose output
  • backtick_standardize - Remove markdown-code-runner from executed code fences
  • execute - Whether to execute code blocks
  • standardize - Post-process to standardize ALL code fences

§Errors

Returns an error if the file cannot be read, written, or if code execution fails.