autolink 0.3.0

HTML auto-linking
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 6.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.26 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oz

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)