Fix unstable emoji sort (#22346)

Without the second sort every generate run produces a different result.
pull/22156/head
KN4CK3R 2 years ago committed by GitHub
parent 906d8cc5dc
commit f74293f9c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      build/generate-emoji.go
  2. 3026
      modules/emoji/emoji_data.go

@ -189,6 +189,10 @@ func generate() ([]byte, error) {
} }
} }
sort.Slice(data, func(i, j int) bool {
return data[i].Aliases[0] < data[j].Aliases[0]
})
// add header // add header
str := replacer.Replace(fmt.Sprintf(hdr, gemojiURL, data)) str := replacer.Replace(fmt.Sprintf(hdr, gemojiURL, data))

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save