GetWordPosition should ignore special characters now chinese sentence doesnt have space as word separator nor a word separator at all, same goes for thai,etc. iirc :)
This commit is contained in:
		@@ -149,10 +149,10 @@ namespace NadekoBot.Modules.CustomReactions.Extensions
 | 
			
		||||
 | 
			
		||||
        private static bool isInvalidWordChar(this string str, int index)
 | 
			
		||||
        {
 | 
			
		||||
            var ch = str[index];
 | 
			
		||||
            if ((byte)ch > 64 && (byte)ch <= 90) // must be A-Z
 | 
			
		||||
            var ch = (ushort)str[index];
 | 
			
		||||
            if (ch > 64 && ch <= 90) // must be A-Z
 | 
			
		||||
                return false;
 | 
			
		||||
            if ((byte)ch > 97 && (byte)ch <= 122) // a-z
 | 
			
		||||
            if (ch > 97 && ch <= 122) // a-z
 | 
			
		||||
                return false;
 | 
			
		||||
 | 
			
		||||
            return true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user