diff --git a/go.mod b/go.mod index 782b20d..e6ffbab 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/gosimple/slug go 1.11 -require github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be +require github.com/gosimple/unidecode v1.0.0 diff --git a/go.sum b/go.sum index b465976..ae58dcc 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be h1:ta7tUOvsPHVHGom5hKW5VXNc2xZIkfCKP8iaqOyYtUQ= -github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be/go.mod h1:MIDFMn7db1kT65GmV94GzpX9Qdi7N/pQlwb+AN8wh+Q= +github.com/gosimple/unidecode v1.0.0 h1:kPdvM+qy0tnk4/BrnkrbdJ82xe88xn7c9hcaipDz4dQ= +github.com/gosimple/unidecode v1.0.0/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc= diff --git a/slug.go b/slug.go index 0754f57..4372ecd 100644 --- a/slug.go +++ b/slug.go @@ -11,7 +11,7 @@ import ( "sort" "strings" - "github.com/rainycape/unidecode" + "github.com/gosimple/unidecode" ) var ( diff --git a/slug_test.go b/slug_test.go index 7ab6ed8..d3144a3 100644 --- a/slug_test.go +++ b/slug_test.go @@ -41,6 +41,7 @@ func TestSlugMake(t *testing.T) { {"-test-slug-", "test-slug"}, {"Æ", "ae"}, {"Ich heiße", "ich-heisse"}, + {"𐀀", ""}, // Bug #53 {"This & that", "this-and-that"}, {"fácil €", "facil-eu"}, @@ -152,7 +153,7 @@ func TestSlugMakeUserSubstituteLang(t *testing.T) { {map[string]string{"&": "or"}, "de", "This & that", "this-or-that"}, // by default "&" => "und" {map[string]string{"&": "or"}, "DEU", "This & that", "this-or-that"}, // by default "&" => "und" {map[string]string{"&": "or"}, "Fin", "This & that", "this-or-that"}, // by default "&" => "ja" - {map[string]string{"&": "or"}, "fr", "This & that", "this-or-that"}, // by default "&" => "ja" + {map[string]string{"&": "or"}, "fr", "This & that", "this-or-that"}, // by default "&" => "ja" {map[string]string{"&": "or"}, "kk", "This & that", "this-or-that"}, // by default "&" => "jane" {map[string]string{"&": "or", "@": "the"}, "sv", "@ This & that", "the-this-or-that"}, // by default "&" => "och", "@" => "snabel a" {map[string]string{"&": "or", "@": "the"}, "de", "@ This & that", "the-this-or-that"}, // by default "&" => "und", "@" => "an"