It was counting numbers as invalid characters in a slug, and they are not.
As the description says, [...]All output from slug.Make(text) shoud pass this test and I've found that if the text contains a number, the IsSlug returns false, an example:
package main
import (
"fmt"
"github.com/gosimple/slug"
)
func main() {
text := "Some text 2 slugify"
sl := slug.Make(text)
fmt.Printf("Slugifyed text: %s\n", sl)
fmt.Printf("(%s)IsSlug: %t\n", sl, slug.IsSlug(sl))
}
It was counting numbers as invalid characters in a slug, and they are not.
As the description says,
[...]All output from slug.Make(text) shoud pass this test
and I've found that if the text contains a number, the IsSlug returnsfalse
, an example:returns