| 376 | } |
| 377 | |
| 378 | func (dmp *DiffMatchPatch) diffBisectSplit(runes1, runes2 []rune, x, y int, |
| 379 | deadline time.Time) []Diff { |
| 380 | runes1a := runes1[:x] |
| 381 | runes2a := runes2[:y] |
| 382 | runes1b := runes1[x:] |
| 383 | runes2b := runes2[y:] |
| 384 | |
| 385 | // Compute both diffs serially. |
| 386 | diffs := dmp.diffMainRunes(runes1a, runes2a, false, deadline) |
| 387 | diffsb := dmp.diffMainRunes(runes1b, runes2b, false, deadline) |
| 388 | |
| 389 | return append(diffs, diffsb...) |
| 390 | } |
| 391 | |
| 392 | // 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. |
| 393 | // It's slightly faster to call DiffLinesToRunes first, followed by DiffMainRunes. |