Scrolled to bottom fix.
This commit is contained in:
		
							parent
							
								
									bf723db2cc
								
							
						
					
					
						commit
						40a292d05e
					
				@ -81,7 +81,7 @@ class ChatInputComponent extends HTMLElement {
 | 
			
		||||
            distance += 10        
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
      console.info([ mention, author, distance ]);
 | 
			
		||||
      console.warn([ mention, author, distance ]);
 | 
			
		||||
      if (distance < minDistance) {
 | 
			
		||||
        minDistance = distance;
 | 
			
		||||
        closestAuthor = author;
 | 
			
		||||
@ -129,11 +129,9 @@ levenshteinDistance(a, b) {
 | 
			
		||||
  const mentions = this.extractMentions(text);
 | 
			
		||||
  
 | 
			
		||||
  const matches = this.matchMentionsToAuthors(mentions, authors);
 | 
			
		||||
 console.info(matches) 
 | 
			
		||||
  let updatedText = text;
 | 
			
		||||
  matches.forEach(({ mention, closestAuthor }) => {
 | 
			
		||||
    const mentionRegex = new RegExp(`@${mention}`, 'g');
 | 
			
		||||
    console.info(closestAuthor)
 | 
			
		||||
      updatedText = updatedText.replace(mentionRegex, `@${closestAuthor}`);
 | 
			
		||||
  });
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user