fix: markdown autolinks

This commit is contained in:
trisua 2025-05-17 20:36:44 -04:00
parent 3326bbc1ae
commit 657c204a66

View file

@ -1,5 +1,5 @@
use ammonia::Builder;
use markdown::{to_html_with_options, Options, CompileOptions, ParseOptions};
use markdown::{to_html_with_options, Options, CompileOptions, ParseOptions, Constructs};
use std::collections::HashSet;
/// Render markdown input into HTML
@ -13,6 +13,10 @@ pub fn render_markdown(input: &str) -> String {
..Default::default()
},
parse: ParseOptions {
constructs: Constructs {
gfm_autolink_literal: true,
..Default::default()
},
gfm_strikethrough_single_tilde: false,
math_text_single_dollar: false,
mdx_expression_parse: None,