1
0
Fork 0
mirror of https://github.com/emojisum/emojisum.git synced 2025-08-02 21:30:28 +00:00

main: make the Map use the first colon notation

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-02-07 14:30:57 -05:00
parent a9e159d830
commit 7fea20724b
Signed by: vbatts
GPG key ID: 10937E57733F1362
2 changed files with 9 additions and 3 deletions

View file

@ -174,7 +174,13 @@ func Sum(r io.Reader) ([]byte, error) {
func emojiFromBytes(buf []byte) string {
var ret string
for _, b := range buf {
ret = ret + esum.Map(b)[0]
for _, e := range esum.Map(b) {
// use the first colon notation word and continue
if esum.IsColonNotation(e) {
ret = ret + e
break
}
}
}
return ret
}