Fix shortcut typo

This commit is contained in:
Pierre HUBERT 2020-04-29 17:01:26 +02:00
parent d8478fa7ad
commit 5007d4779f
2 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ ComunicWeb.components.emoji.parser = {
parse: function(info){ parse: function(info){
//Peform string parsing //Peform string parsing
info.element.innerHTML = this.shorcutToHTMLcode(info.element.innerHTML); info.element.innerHTML = this.shortcutToHTMLcode(info.element.innerHTML);
// Parse custom semicolons // Parse custom semicolons
if(info.user) if(info.user)
@ -84,12 +84,12 @@ ComunicWeb.components.emoji.parser = {
}, },
/** /**
* Perform shorcut emoji to HTML code parsing * Perform shortcut emoji to HTML code parsing
* *
* @param {String} string The input string * @param {String} string The input string
* @return {String} The output string * @return {String} The output string
*/ */
shorcutToHTMLcode: function(string){ shortcutToHTMLcode: function(string){
//Process all emojie list //Process all emojie list
var i; var i;
@ -113,7 +113,7 @@ ComunicWeb.components.emoji.parser = {
*/ */
parseCustomEmojis: function(user, input) { parseCustomEmojis: function(user, input) {
for(const e of user.customEmojis) { for(const e of user.customEmojis) {
input = input.replace(new RegExp(e.shorcut, "g"), "<img src='"+e.url+"' class='emoji' alt='"+e.shorcut+"' title='"+e.shorcut+"'/>") input = input.replace(new RegExp(e.shortcut, "g"), "<img src='"+e.url+"' class='emoji' alt='"+e.shortcut+"' title='"+e.shortcut+"'/>")
} }
return input return input

View File

@ -72,7 +72,7 @@ class EmojiesSection {
line.innerHTML += "<td><img class='e' src='"+e.url+"' /></td>" + line.innerHTML += "<td><img class='e' src='"+e.url+"' /></td>" +
"<td>"+e.shorcut+"</td><td></td>" "<td>"+e.shortcut+"</td><td></td>"
// Add delete button // Add delete button