Scrolled to bottom fix.
This commit is contained in:
parent
46052172b2
commit
bf723db2cc
@ -75,15 +75,19 @@ class ChatInputComponent extends HTMLElement {
|
||||
authors.forEach(author => {
|
||||
const lowerAuthor = author.toLowerCase();
|
||||
let distance = this.levenshteinDistance(lowerMention, lowerAuthor);
|
||||
|
||||
|
||||
if(!this.isSubsequence(lowerMention,lowerAuthor)) {
|
||||
distance += 10
|
||||
}
|
||||
|
||||
console.info([ mention, author, distance ]);
|
||||
if (distance < minDistance) {
|
||||
minDistance = distance;
|
||||
closestAuthor = author;
|
||||
|
||||
}
|
||||
console.info({ mention, closestAuthor, distance });
|
||||
|
||||
});
|
||||
|
||||
return { mention, closestAuthor, distance: minDistance };
|
||||
|
Loading…
Reference in New Issue
Block a user