2 unstable releases

0.2.0 Aug 3, 2023
0.1.0 Jun 26, 2023

#1241 in Text processing

Download history 26/week @ 2024-04-12 18/week @ 2024-04-19 13/week @ 2024-04-26 23/week @ 2024-05-03 14/week @ 2024-05-10 8/week @ 2024-05-17 26/week @ 2024-05-24 20/week @ 2024-05-31 19/week @ 2024-06-07 28/week @ 2024-06-14 22/week @ 2024-06-21 14/week @ 2024-06-28 22/week @ 2024-07-05 15/week @ 2024-07-12 14/week @ 2024-07-19 32/week @ 2024-07-26

83 downloads per month
Used in markdown-it-gfm

Apache-2.0

30KB
575 lines

markdown-it-autolink.rs

crates.io

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