| 374 | } |
| 375 | |
| 376 | func (dmp *DiffMatchPatch) diffBisectSplit(runes1, runes2 []rune, x, y int, |
| 377 | deadline time.Time) []Diff { |
| 378 | runes1a := runes1[:x] |
| 379 | runes2a := runes2[:y] |
| 380 | runes1b := runes1[x:] |
| 381 | runes2b := runes2[y:] |
| 382 | |
| 383 | // Compute both diffs serially. |
| 384 | diffs := dmp.diffMainRunes(runes1a, runes2a, false, deadline) |
| 385 | diffsb := dmp.diffMainRunes(runes1b, runes2b, false, deadline) |
| 386 | |
| 387 | return append(diffs, diffsb...) |
| 388 | } |
| 389 | |
| 390 | // DiffLinesToChars splits two texts into a list of strings, and educes the texts to a string of hashes where each Unicode character represents one line. |
| 391 | // It's slightly faster to call DiffLinesToRunes first, followed by DiffMainRunes. |