DiffLinesToRunes splits two texts into a list of runes. At most 1,112,060 unique lines can be encoded across both texts; if the texts contain more unique lines, this function panics.
(text1, text2 string)
| 400 | // DiffLinesToRunes splits two texts into a list of runes. |
| 401 | // At most 1,112,060 unique lines can be encoded across both texts; if the texts contain more unique lines, this function panics. |
| 402 | func (dmp *DiffMatchPatch) DiffLinesToRunes(text1, text2 string) ([]rune, []rune, []string) { |
| 403 | chars1, chars2, lineArray := dmp.diffLinesToStrings(text1, text2) |
| 404 | return []rune(chars1), []rune(chars2), lineArray |
| 405 | } |
| 406 | |
| 407 | // DiffCharsToLines rehydrates the text in a diff from a string of line hashes to real lines of text. |
| 408 | func (dmp *DiffMatchPatch) DiffCharsToLines(diffs []Diff, lineArray []string) []Diff { |