Skip to content

Commit f74293f

Browse files
authored
Fix unstable emoji sort (#22346)
Without the second sort every generate run produces a different result.
1 parent 906d8cc commit f74293f

File tree

2 files changed

+1517
-1513
lines changed

2 files changed

+1517
-1513
lines changed

Diff for: build/generate-emoji.go

+4
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ func generate() ([]byte, error) {
189189
}
190190
}
191191

192+
sort.Slice(data, func(i, j int) bool {
193+
return data[i].Aliases[0] < data[j].Aliases[0]
194+
})
195+
192196
// add header
193197
str := replacer.Replace(fmt.Sprintf(hdr, gemojiURL, data))
194198

0 commit comments

Comments
 (0)