Emoji: better regex when testing for only char emoji. Props iseulde. See #31242.
git-svn-id: https://develop.svn.wordpress.org/trunk@31772 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
870da19630
commit
1f05ad1b50
|
@ -102,7 +102,7 @@ window.wp = window.wp || {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Chrome OS X added native emoji rendering in M41. Unfortunately,
|
* Chrome on OS X added native emoji rendering in M41. Unfortunately,
|
||||||
* it doesn't work when the font is bolder than 500 weight. So, we
|
* it doesn't work when the font is bolder than 500 weight. So, we
|
||||||
* check for bold rendering support to avoid invisible emoji in Chrome.
|
* check for bold rendering support to avoid invisible emoji in Chrome.
|
||||||
*/
|
*/
|
||||||
|
@ -174,7 +174,9 @@ window.wp = window.wp || {};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( emoji.parseFlags && ! emoji.parseAllEmoji && ! icon.match( /^1f1(e[6-9a-f]|f[1-9a-f])-1f1(e[6-9a-f]|f[1-9a-f])$/ ) ) {
|
if ( emoji.parseFlags && ! emoji.parseAllEmoji &&
|
||||||
|
! /^1f1(?:e[6-9a-f]|f[1-9a-f])-1f1(?:e[6-9a-f]|f[1-9a-f])$/.test( icon ) ) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue