Crates.io | autolink |
lib.rs | autolink |
version | 0.3.0 |
source | src |
created_at | 2015-11-21 17:06:37.816644 |
updated_at | 2020-01-20 16:47:06.848074 |
description | HTML auto-linking |
homepage | https://git.cypr.io/oz/autolink-rust |
repository | https://git.cypr.io/oz/autolink-rust.git |
max_upload_size | |
id | 3469 |
size | 6,012 |
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.
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)