Skip to content

Commit 390cf8f

Browse files
committed
fixup! fast path for matching strings
1 parent 7f7c592 commit 390cf8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script/core/definition.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ end
5151
--- @param path2 string
5252
--- @return number
5353
local function pathSimilarityRatio(path1, path2)
54+
if path1 == path2 then
55+
return 0
56+
end
5457
local parts1 = split(path1)
5558
local parts2 = split(path2)
5659
local distance = levenshteinDistance(parts1, parts2)

0 commit comments

Comments
 (0)