Skip to content

Commit 6895bfd

Browse files
committed
-
1 parent 5b055fa commit 6895bfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diffmatchpatch/diff.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ func commonSuffixLength(text1, text2 []rune) int {
500500
// DiffCommonOverlap determines if the suffix of one string is the prefix of another.
501501
func (dmp *DiffMatchPatch) DiffCommonOverlap(text1 string, text2 string) int {
502502
// Cache the text lengths to prevent multiple calls.
503-
text1Length := len([]rune(text1))
504-
text2Length := len([]rune(text2))
503+
text1Length := len(text1)
504+
text2Length := len(text2)
505505
// Eliminate the null case.
506506
if text1Length == 0 || text2Length == 0 {
507507
return 0

0 commit comments

Comments
 (0)