How does SO's (or other SE sites) versioning work of questions and answers? Do they use some standard piece of code or is it something homebrew?
With versioning I meant if for example a question is edited you'll see all the changes (a diff).
It's homebrew, as far as I know (I am sure one of the developers can confirm).
Every version is stored in the database - what you see is the result of some string diff algorithms to show the differences.
I recall Jeff posting about string diff algorithms in this exact context, but can't find a reference.