DiffBisect finds the 'middle snake' of a diff, split the problem in two and return the recursively constructed diff. If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character. See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
(text1, text2 string, deadline time.Time)
| 254 | // If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character. |
| 255 | // See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations. |
| 256 | func (dmp *DiffMatchPatch) DiffBisect(text1, text2 string, deadline time.Time) []Diff { |
| 257 | // Unused in this code, but retained for interface compatibility. |
| 258 | return dmp.diffBisect([]rune(text1), []rune(text2), deadline) |
| 259 | } |
| 260 | |
| 261 | // diffBisect finds the 'middle snake' of a diff, splits the problem in two and returns the recursively constructed diff. |
| 262 | // See Myers's 1986 paper: An O(ND) Difference Algorithm and Its Variations. |