disable "smart punctuation" option of pulldown_cmark

the main thing i dislike with this is how it renders double quotes
as the "fancy" double quotes variation. bleh!
This commit is contained in:
Gered 2023-07-06 19:23:35 -04:00
parent cff659b072
commit c7665fdc79

View file

@ -107,7 +107,9 @@ impl MarkdownRenderer {
}
pub fn render_to_html(&self, s: &str) -> Result<String, MarkdownError> {
let parser = Parser::new_ext(s, pulldown_cmark::Options::all());
let mut options = pulldown_cmark::Options::all();
options.set(pulldown_cmark::Options::ENABLE_SMART_PUNCTUATION, false);
let parser = Parser::new_ext(s, options);
let events = self.highlight_codeblocks(parser)?;
let mut output = String::new();
pulldown_cmark::html::push_html(&mut output, events);