mirror of
https://github.com/twitter/twemoji.git
synced 2024-10-02 21:02:03 +00:00
Better comment
This commit is contained in:
parent
f1bc673d62
commit
f8c7388bc9
@ -335,7 +335,6 @@ Queue([
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Items is an array of unicode sequences with \u escaping, like ["\u2963\ufe0f", "\u263a\ufe0f"]
|
// Items is an array of unicode sequences with \u escaping, like ["\u2963\ufe0f", "\u263a\ufe0f"]
|
||||||
// items get sorted by length (long to short), then unicode hex values (high to low)
|
|
||||||
// output is "or" ed together using | for regex
|
// output is "or" ed together using | for regex
|
||||||
// ouput also combines adjacent items using character classes with ranges when they have common prefixes
|
// ouput also combines adjacent items using character classes with ranges when they have common prefixes
|
||||||
// Example: "aab", "aac", "aad", "aag", "ba" becomes "aa[b-dg]|ba"
|
// Example: "aab", "aac", "aad", "aag", "ba" becomes "aa[b-dg]|ba"
|
||||||
@ -369,6 +368,7 @@ Queue([
|
|||||||
return result.join('|');
|
return result.join('|');
|
||||||
|
|
||||||
// a and b are arrays of hex UCS-2 units
|
// a and b are arrays of hex UCS-2 units
|
||||||
|
// items get sorted by length (long to short), then unicode hex values (low to high)
|
||||||
function sortMethod(a, b) {
|
function sortMethod(a, b) {
|
||||||
return !a.length ? 0 :
|
return !a.length ? 0 :
|
||||||
b.length - a.length ||
|
b.length - a.length ||
|
||||||
|
Loading…
Reference in New Issue
Block a user