Add ability to apply a diff to text