autolink

Crates.ioautolink
lib.rsautolink
version0.3.0
sourcesrc
created_at2015-11-21 17:06:37.816644
updated_at2020-01-20 16:47:06.848074
descriptionHTML auto-linking
homepagehttps://git.cypr.io/oz/autolink-rust
repositoryhttps://git.cypr.io/oz/autolink-rust.git
max_upload_size
id3469
size6,012
Arnaud Berthomier (oz)

documentation

README

autolink

Crates.io Status 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)
Commit count: 0

cargo fmt