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

#41 in #wrap

29 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–3MB
~54K SLoC