DiffMainRunes finds the differences between two rune sequences. If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character.
(text1, text2 []rune, checklines bool)
| 88 | // DiffMainRunes finds the differences between two rune sequences. |
| 89 | // If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character. |
| 90 | func (dmp *DiffMatchPatch) DiffMainRunes(text1, text2 []rune, checklines bool) []Diff { |
| 91 | var deadline time.Time |
| 92 | if dmp.DiffTimeout > 0 { |
| 93 | deadline = time.Now().Add(dmp.DiffTimeout) |
| 94 | } |
| 95 | return dmp.diffMainRunes(text1, text2, checklines, deadline) |
| 96 | } |
| 97 | |
| 98 | func (dmp *DiffMatchPatch) diffMainRunes(text1, text2 []rune, checklines bool, deadline time.Time) []Diff { |
| 99 | if runesEqual(text1, text2) { |