Fix readmes not rendering github formatted markdown
Signed-off-by: Jordan Doyle <jordan@doyle.la>
Diff
src/git.rs | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
@@ -10,7 +10,7 @@
use anyhow::{anyhow, Context, Result};
use axum::response::IntoResponse;
use bytes::{BufMut, Bytes, BytesMut};
use comrak::{ComrakOptions, ComrakPlugins};
use comrak::{ComrakPlugins, Options};
use git2::{
DiffFormat, DiffLineType, DiffOptions, DiffStatsFormat, Email, EmailCreateOptions, ObjectType,
Oid, Signature, TreeWalkResult,
@@ -433,7 +433,17 @@
let highlighter = ComrakSyntectAdapter { syntax_set };
plugins.render.codefence_syntax_highlighter = Some(&highlighter);
comrak::markdown_to_html_with_plugins(s, &ComrakOptions::default(), &plugins)
let mut options = Options::default();
options.extension.autolink = true;
options.extension.footnotes = true;
options.extension.strikethrough = true;
options.extension.table = true;
options.extension.tagfilter = true;
options.extension.tasklist = true;
comrak::markdown_to_html_with_plugins(s, &options, &plugins)
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]