mirror of
https://github.com/twitter/twemoji.git
synced 2025-03-28 19:20:28 +00:00
Use U200D var
This commit is contained in:
parent
ba0f4e7847
commit
0bb11e6ec5
@ -232,6 +232,9 @@ define(function () {
|
||||
// not JIT based, and old browsers / engines
|
||||
UFE0Fg = /\uFE0F/g,
|
||||
|
||||
// avoid using a string literal like '\u200D' here because minifiers expand it inline
|
||||
U200D = String.fromCharCode(0x200D),
|
||||
|
||||
// used to find HTML special chars in attributes
|
||||
rescaper = /[&<>'"]/g,
|
||||
|
||||
@ -316,8 +319,7 @@ define(function () {
|
||||
*/
|
||||
function grabTheRightIcon(rawText) {
|
||||
// if variant is present as \uFE0F
|
||||
// (avoid using a string literal for '\u200D' or minifiers may inject the raw value)
|
||||
return toCodePoint(rawText.indexOf(String.fromCharCode(0x200D)) < 0 ?
|
||||
return toCodePoint(rawText.indexOf(U200D) < 0 ?
|
||||
rawText.replace(UFE0Fg, '') :
|
||||
rawText
|
||||
);
|
||||
|
@ -231,6 +231,9 @@ var twemoji = (function (
|
||||
// not JIT based, and old browsers / engines
|
||||
UFE0Fg = /\uFE0F/g,
|
||||
|
||||
// avoid using a string literal like '\u200D' here because minifiers expand it inline
|
||||
U200D = String.fromCharCode(0x200D),
|
||||
|
||||
// used to find HTML special chars in attributes
|
||||
rescaper = /[&<>'"]/g,
|
||||
|
||||
@ -315,8 +318,7 @@ var twemoji = (function (
|
||||
*/
|
||||
function grabTheRightIcon(rawText) {
|
||||
// if variant is present as \uFE0F
|
||||
// (avoid using a string literal for '\u200D' or minifiers may inject the raw value)
|
||||
return toCodePoint(rawText.indexOf(String.fromCharCode(0x200D)) < 0 ?
|
||||
return toCodePoint(rawText.indexOf(U200D) < 0 ?
|
||||
rawText.replace(UFE0Fg, '') :
|
||||
rawText
|
||||
);
|
||||
|
2
2/twemoji.min.js
vendored
2
2/twemoji.min.js
vendored
File diff suppressed because one or more lines are too long
@ -232,6 +232,9 @@ var twemoji = (function (
|
||||
// not JIT based, and old browsers / engines
|
||||
UFE0Fg = /\uFE0F/g,
|
||||
|
||||
// avoid using a string literal like '\u200D' here because minifiers expand it inline
|
||||
U200D = String.fromCharCode(0x200D),
|
||||
|
||||
// used to find HTML special chars in attributes
|
||||
rescaper = /[&<>'"]/g,
|
||||
|
||||
@ -316,8 +319,7 @@ var twemoji = (function (
|
||||
*/
|
||||
function grabTheRightIcon(rawText) {
|
||||
// if variant is present as \uFE0F
|
||||
// (avoid using a string literal for '\u200D' or minifiers may inject the raw value)
|
||||
return toCodePoint(rawText.indexOf(String.fromCharCode(0x200D)) < 0 ?
|
||||
return toCodePoint(rawText.indexOf(U200D) < 0 ?
|
||||
rawText.replace(UFE0Fg, '') :
|
||||
rawText
|
||||
);
|
||||
|
@ -647,6 +647,9 @@ function createTwemoji(re) {
|
||||
// not JIT based, and old browsers / engines
|
||||
UFE0Fg = /\uFE0F/g,
|
||||
|
||||
// avoid using a string literal like '\u200D' here because minifiers expand it inline
|
||||
U200D = String.fromCharCode(0x200D),
|
||||
|
||||
// used to find HTML special chars in attributes
|
||||
rescaper = /[&<>'"]/g,
|
||||
|
||||
@ -731,8 +734,7 @@ function createTwemoji(re) {
|
||||
*/
|
||||
function grabTheRightIcon(rawText) {
|
||||
// if variant is present as \uFE0F
|
||||
// (avoid using a string literal for '\u200D' or minifiers may inject the raw value)
|
||||
return toCodePoint(rawText.indexOf(String.fromCharCode(0x200D)) < 0 ?
|
||||
return toCodePoint(rawText.indexOf(U200D) < 0 ?
|
||||
rawText.replace(UFE0Fg, '') :
|
||||
rawText
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user