16 lines
476 B
Rust
16 lines
476 B
Rust
use pulldown_cmark::{html, Options, Parser};
|
|
|
|
const CHANGELOG_MD: &str = include_str!("../../../CHANGELOG.md");
|
|
|
|
#[tauri::command]
|
|
pub async fn get_changelog() -> Result<String, String> {
|
|
let options =
|
|
Options::ENABLE_HEADING_ATTRIBUTES | Options::ENABLE_STRIKETHROUGH | Options::ENABLE_TABLES;
|
|
|
|
let parser = Parser::new_ext(CHANGELOG_MD, options);
|
|
let mut html_output = String::new();
|
|
html::push_html(&mut html_output, parser);
|
|
|
|
Ok(html_output)
|
|
}
|