fix: markdown autolinks
This commit is contained in:
parent
3326bbc1ae
commit
657c204a66
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
use ammonia::Builder;
|
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;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
/// Render markdown input into HTML
|
/// Render markdown input into HTML
|
||||||
|
@ -13,6 +13,10 @@ pub fn render_markdown(input: &str) -> String {
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
parse: ParseOptions {
|
parse: ParseOptions {
|
||||||
|
constructs: Constructs {
|
||||||
|
gfm_autolink_literal: true,
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
gfm_strikethrough_single_tilde: false,
|
gfm_strikethrough_single_tilde: false,
|
||||||
math_text_single_dollar: false,
|
math_text_single_dollar: false,
|
||||||
mdx_expression_parse: None,
|
mdx_expression_parse: None,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue