forPelevin / gomoji

Helpful functions to work with emoji in Golang
MIT License
190 stars 28 forks source link

All numbers are judged as emoji #4

Closed ShawnOY closed 2 years ago

ShawnOY commented 2 years ago

Hi there, I found if the string including any number, there will always return true, for example:

package main

import (
    "fmt"

    "github.com/forPelevin/gomoji"
)

func main() {
    fmt.Println(gomoji.ContainsEmoji("1"))
    // output: true

    fmt.Println(gomoji.ContainsEmoji("asdf1"))
    // output: true

    fmt.Println(gomoji.ContainsEmoji("asdf"))
    // output: false
}
forPelevin commented 2 years ago

Hey,

Thank you for the found bug. I'll fix it soon.

forPelevin commented 2 years ago

Hey,

The release v1.1.1 has fixes for the issue. So please update the lib in your dependencies.

Thank you again for the report. It was beneficial for GoMoji.

If you have anything else, please feel free to ask.