Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
pakohan committed Dec 12, 2019
1 parent 5b055fa commit 6895bfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diffmatchpatch/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ func commonSuffixLength(text1, text2 []rune) int {
// DiffCommonOverlap determines if the suffix of one string is the prefix of another.
func (dmp *DiffMatchPatch) DiffCommonOverlap(text1 string, text2 string) int {
// Cache the text lengths to prevent multiple calls.
text1Length := len([]rune(text1))
text2Length := len([]rune(text2))
text1Length := len(text1)
text2Length := len(text2)
// Eliminate the null case.
if text1Length == 0 || text2Length == 0 {
return 0
Expand Down

0 comments on commit 6895bfd

Please sign in to comment.