1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-07-03 03:18:58 +00:00

Better comment

This commit is contained in:
Tom Wuttke 2016-03-02 14:53:49 -08:00
parent f1bc673d62
commit f8c7388bc9

View File

@ -335,7 +335,6 @@ Queue([
}
// 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
// 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"
@ -369,6 +368,7 @@ Queue([
return result.join('|');
// 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) {
return !a.length ? 0 :
b.length - a.length ||