Scrolled to bottom fix.

This commit is contained in:
retoor 2025-05-27 12:14:02 +02:00
parent 4f777f0003
commit 46052172b2

View File

@ -76,13 +76,14 @@ class ChatInputComponent extends HTMLElement {
const lowerAuthor = author.toLowerCase(); const lowerAuthor = author.toLowerCase();
let distance = this.levenshteinDistance(lowerMention, lowerAuthor); let distance = this.levenshteinDistance(lowerMention, lowerAuthor);
if(!this.isSubsequence(lowerMention,lowerAuthor)) { if(!this.isSubsequence(lowerMention,lowerAuthor)) {
distance += 1 distance += 10
} }
if (distance < minDistance) { if (distance < minDistance) {
minDistance = distance; minDistance = distance;
closestAuthor = author; closestAuthor = author;
console.info({ mention, closestAuthor, distance });
} }
console.info({ mention, closestAuthor, distance });
}); });
return { mention, closestAuthor, distance: minDistance }; return { mention, closestAuthor, distance: minDistance };