1 unstable release

0.1.0 Oct 8, 2018

#66 in Template engine

Download history 7/week @ 2018-10-08 3/week @ 2018-10-15 12/week @ 2018-10-22 1/week @ 2018-10-29 8/week @ 2018-11-05 5/week @ 2018-11-12 5/week @ 2018-11-19 2/week @ 2018-11-26 5/week @ 2018-12-03 5/week @ 2018-12-10

7 downloads per month

MIT license

14KB
397 lines

htmldiff

Rust port of myobie/htmldiff.

Installation

Cargo

$ cargo install htmldiff

Manual

You can download prebuilt binaries in the releases section, or create from source.

$ git clone https://github.com/seikichi/htmldiff.git
$ cd htmldiff
$ cargo build --release

Run

$ cat old.html
<p>Hello, world!</p>
$ cat new.html
<p>Hello, seikichi!</p>
$ htmldiff old.html new.html
<p>Hello, <del>world!</del><ins>seikichi!</ins></p>

Use as Library

Add the following to your Cargo.toml file:

[dependencies]
htmldiff = "0.1"

Next, call htmldiff::htmldiff function in your code:

extern crate htmldiff;

fn main() {
    let old = "

Hello, world!

"; let new = "

Hello, seikichi!

"; println!("{}", htmldiff::htmldiff(old, new)); }

License

MIT

No runtime deps