Enable some extentions for the Markdown syntax
Enable the strikethrough, tagfilter, tasklist and autolink extensions from the GFM spec.
This commit is contained in:
parent
fe9a5f1f52
commit
51d3e876d6
|
@ -8,8 +8,13 @@ use std::time::SystemTime;
|
|||
|
||||
/// Converts raw string data (in Markdown format) to HTML
|
||||
pub fn data_to_html(data: &String) -> String {
|
||||
comrak::markdown_to_html(data,
|
||||
&comrak::ComrakOptions::default())
|
||||
let mut options = comrak::ComrakOptions::default();
|
||||
options.ext_strikethrough = true;
|
||||
options.ext_tagfilter = true;
|
||||
options.ext_autolink = true;
|
||||
options.ext_tasklist = true;
|
||||
|
||||
comrak::markdown_to_html(data, &options)
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
|
|
Loading…
Reference in New Issue