Skip to main content

diff

Function diff 

Source
pub fn diff(old: &str, new: &str) -> Block
Expand description

A line diff between two texts: removed lines in red, added in sage, unchanged dim.

let d = tinsel::diff("memory = 256\n", "memory = 512\n");
assert_eq!(d.plain(), "  -  memory = 256\n  +  memory = 512");