xdiff-live 0.1.1

A live diff tool for comparing files and directories.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fs;
use serde_json::json;
use xdiff_live::highlight_text;

fn main() {
    let v = json!({
        "foo": "bar",
        "baz": "qux",
    });

    let text = serde_json::to_string_pretty(&v).unwrap();
    let content = highlight_text(&text, "json", None).unwrap();

    fs::write("fixtures/highlight1.txt", content).unwrap();
}