facebook/react — pull request #2629 by arnihermann (2014-11-30 16:36:03+00:00)
Title: Give context aware message if markup reuse fails

This change calculates the longest common substring between the server side rendered markup and the client markup and uses that to give context about failure to the developer.

The context is an extra message with comparison of where server and client markup started to differ:

![image](https://cloud.githubusercontent.com/assets/35656/5238366/ed1b1c0a-78ae-11e4-810d-67afe4ca9817.png)

**Note:** I used `longestCommonSubstring` from http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring. I'm not sure how the impact of this regarding license (it's CC licensed afaik).

All feedback is appreciated.