@adamchainz Cc @josh since this might save some hair being pulled out for a shared theme and fields template project. 🤔
I did have a strange linting/auto-formatting cause a textarea to prepend 4 to 8 spaces in front of values that I had to turn off on a few projects that wasn’t immediately obvious.
@adamchainz This sounds very similar to snapshot testing (where the output of a long string is saved & the test fails when the string changes... the snapshot tool shows a diff & you decide if you wanted that diff).
This also sounds like how I'd implement a "pip install" for a gist or a stackoverflow question, both of which evolve & are not real packages, so they'd need ad hoc tooling support.
@adamchainz I put way to much time into treating an stackoverflow answer as a library, but never got around to fully implementing the update part because so few answers are fully usable as-is.
@adamchainz Neat, this is one of those things that seems like it should normally come with a disclaimer "for entertainment value only, do not use", but on the rare occasion that you need it....
I wonder if there's a better way to present the diff of diffs that could be built into a custom output hook? 🤔
@diazona I tried to cover alternatives first, and let engineers decide. I can’t say I did this for “entertainment” 😆
Maybe there is a better diff-of-diff presentation. Git has its three-way diff format used for merge commits - maybe that could be used. Still hard to read though.
@adamchainz oh, this is so good. I try to avoid getting in this position, but sometimes it’s unavoidable. Quickly adopting this approach the few places I’ve done this. 🎉
Add comment