2 unstable releases
0.2.0 | Aug 3, 2023 |
---|---|
0.1.0 | Jun 26, 2023 |
#1241 in Text processing
83 downloads per month
Used in markdown-it-gfm
30KB
575 lines
markdown-it-autolink.rs
A markdown-it.rs plugin that implements the Github Flavoured Markdown autolink extension.
Usage
let md = &mut markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(md);
markdown_it_autolink::add(md);
md.parse("www.example.com").render();
// <p><a href="http://www.example.com">www.example.com</a></p>
lib.rs
:
Implement the Github Flavoured Markdown autolink extension.
let md = &mut markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(md);
markdown_it_autolink::add(md);
assert_eq!(
md.parse("www.example.com").render(),
"<p><a href=\"http://www.example.com\">www.example.com</a></p>\n",
);
Dependencies
~5.5–7.5MB
~163K SLoC