Support rendering markdown content

This commit is contained in:
Bnyro
2023-06-19 08:02:44 +02:00
parent ef6ee57f6c
commit e4ea0ed5ba
7 changed files with 248 additions and 6 deletions

View File

@@ -12,3 +12,7 @@ pub fn get_web_image_url(url: Option<DbUrl>) -> String {
url.to_string()
} else { String::from("") }
}
pub fn markdown_to_pango_markup(text: String) -> String {
return html2pango::markup_html(&markdown::to_html(&text)).unwrap_or(text)
}