pub fn extract_markdown_block_with_lang(
text: &str,
lang: &str,
) -> Result<String, ParseError>Expand description
Extracts content from a Markdown code block with a specific language.
This function searches for a code block with the specified language hint
(e.g., rust, python) and returns its content.
§Arguments
text- The text containing the markdown code blocklang- The language specifier to match (e.g., “rust”, “python”)
§Returns
A Result containing the extracted code block content on success, or a ParseError
if no code block with the specified language is found.