convert

Function convert 

Source
pub fn convert(html: &str, options: Option<ConversionOptions>) -> Result<String>
Expand description

Convert HTML to Markdown.

This function takes HTML input and converts it to Markdown using the provided options. If no options are provided, default options will be used.

§Arguments

  • html - The HTML string to convert
  • options - Optional conversion options

§Example

use html_to_markdown::{convert, ConversionOptions};

let html = "<h1>Hello World</h1>";
let markdown = convert(html, None).unwrap();
assert!(markdown.contains("Hello World"));