3 releases (breaking)

Uses old Rust 2015

0.3.0 Jan 20, 2020
0.2.0 Jan 17, 2016
0.1.0 Nov 21, 2015

#47 in #wrap

Download history 39/week @ 2024-02-19 9/week @ 2024-02-26 7/week @ 2024-03-04 13/week @ 2024-03-11

68 downloads per month
Used in phroxy

Custom license

5KB
64 lines

autolink

License

HTML auto-linking for Rust.

This is a small Rust crate, porting parts of Aaron Patterson's rails_autolink, to wrap URLs in raw text into <a> HTML tags.

Examples

  use autolink::autolink;

  let before = "Share code on https://crates.io";
  let after = "Share code on <a href=\"https://crates.io\" target=\"_blank\">https://crates.io</a>";
  assert!(autolink(before, &vec!["target=\"_blank\""]) == after)

Dependencies

~2.2–3MB
~54K SLoC