Update search for colon-syntax emoji to ignore case (#3443)
* Add tests for existing replaceColons functionality * Update to lowercase before matching short names * Update lib_test.ts
This commit is contained in:
parent
cb272111ab
commit
f2dd10cd1a
2 changed files with 31 additions and 0 deletions
|
@ -255,6 +255,7 @@ export function replaceColons(str: string) {
|
|||
return str.replace(/:[a-z0-9-_+]+:(?::skin-tone-[1-5]:)?/gi, m => {
|
||||
const [shortName = '', skinTone = '0'] = m
|
||||
.replace('skin-tone-', '')
|
||||
.toLowerCase()
|
||||
.split(':')
|
||||
.filter(Boolean);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue