use pulldown_cmark::{html, Parser};


pub enum Converter {}



impl Converter
{
   /// Private function to handle the core conversion logic
   pub fn markdown_to_html(markdown_content: &str) -> String
   {
      let parser = Parser::new(markdown_content);
      let mut html_output = String::new();
      html::push_html(&mut html_output, parser);
      html_output
   }
}

// tests/integration_test.rs
// This file would be in your project's `tests` directory.
// It tests the public functions of your main program.
// You will also need to add `use crate::*` to access the functions.

#[cfg(test)]
mod tests
{
   use super::*;

   #[test]
   fn test_markdown_conversion()
   {
      // Create a temporary Markdown file for the test
      let markdown_content = "# Hello, World!\n\nThis is a **test**.";
      let expected_html =
         "<h1>Hello, World!</h1>\n<p>This is a <strong>test</strong>.</p>\n";

      // Use the new Converter API
      let converted_html = Converter::markdown_to_html(&markdown_content);

      // Assert that the output matches the expected HTML
      assert_eq!(converted_html.trim(), expected_html.trim());
   }
}
