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:
parent
a9e159d830
commit
7fea20724b
2 changed files with 9 additions and 3 deletions
8
main.go
8
main.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue