Difftastic is getting closer to being a tool that I can recommend for daily usage! I've just tagged v0.4: https://crates.io/crates/difftastic
This release includes much smarter diff logic, considering newlines and nesting depth to produce more comprehensible diffs. It's faster too :)
miniblog.
Related Posts
Seen in the wild: replace all the newlines with a literal $ in sed:
sed -e 's/$/$/'
It's always bugged me that regex replace syntax looks similar to regex, occurs close to the search syntax, but actually has a different meaning. It's harder to read.
Devious regexp trick I've not seen before: [^]
Negating the empty set matches any character, which lets you emulate DOTALL (i.e. a . matches newlines too) on older regexp implementations.
I've been playing with 'sliders' in difftastic, the classic diff problem where you highlight an adjacent value that is correct but weird.
I've taught difftastic to penalise sequences across newlines. This largely works, but it hurts perf (another degree of freedom to solve).

