Allow to use emoji's as icons, fix #1997

This commit is contained in:
Pieter Vander Vennet 2024-06-20 02:22:54 +02:00
parent 1bab69c71f
commit 9deae9e659
5 changed files with 40 additions and 3 deletions

View file

@ -1659,4 +1659,14 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
}
}
}
private static emojiRegex = /^\p{Extended_Pictographic}+$/u
/**
* Returns 'true' if the given string contains at least one and only emoji characters
* @param string
*/
public static isEmoji(string: string){
return Utils.emojiRegex.test(string)
}
}