mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Consider spacing when converting string to unicode emote
This commit is contained in:
		@@ -1878,8 +1878,9 @@
 | 
				
			|||||||
        };
 | 
					        };
 | 
				
			||||||
        for (var i in map) {
 | 
					        for (var i in map) {
 | 
				
			||||||
            var escaped = i.replace(/([()[{*+.$^\\|?])/g, '\\$1');
 | 
					            var escaped = i.replace(/([()[{*+.$^\\|?])/g, '\\$1');
 | 
				
			||||||
 | 
					            escaped = "(\\s|^)(" + escaped + ")(\\s|$)";
 | 
				
			||||||
            var regex = new RegExp(escaped, 'gim');
 | 
					            var regex = new RegExp(escaped, 'gim');
 | 
				
			||||||
            input = input.replace(regex, map[i]);
 | 
					            input = input.replace(regex, "$1" + map[i] + "$3");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return input;
 | 
					        return input;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user