What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

Here is a recent experience of mine:

I notice a poorly structured question (had many grammatical issues). I quickly went through and edited it. After looking over my suggested edit, I nearly clicked submit but was notified that someone else beat me to the punch. I submitted my edit anyway, thinking that a reviewer would know which edit was better -- but I did not check the other edit myself.

I would have liked to review the changes made by the other editor before submitting my suggested edit. To do this, I could have CTRL-C copied my changes, cancelled, viewed the new edit, and re-edited the comment if I decided my edit was better using paste.

My question:

If I had used this copy-paste strategy, would it have highlighted the entirety of my paste as an edit? Or would it have been smart enough to notice that the copy-pasted text was only different in a few places?

(Additionally, is there a way to view the new edit without navigating away from the editing page?)

share|improve this question
I think it is smart enough :) It just compares the content. But if there is some indentation changes - that will show up as a difference though... Copy p̶a̶s̶t̶a̶ paste should be "edit safe". –  Lix Aug 8 '12 at 17:53
You could just open the thread up in a new tab/window to view the other poster's edits rather than copying your content and navigating away. –  Servy Aug 8 '12 at 18:07

1 Answer 1

up vote 0 down vote accepted

The highlighting is not based on some sort of client side events that look at every time a character is added or edited. It is based on nothing more than the before and after text. There is an algorithm (that's not super trivial) that is used to highlight differences. It is actually a fairly interesting problem, with a number of different possible methods for solving it (each with their own drawbacks).

Since only the final text of the markup is what matters, the fact that you copied it to an external source and then back will have no effect on the highlighting.

share|improve this answer
Fantastic, thank you. –  BlackVegetable Aug 8 '12 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .