Skip to content

Commit

Permalink
Change to gosimple/unidecode fork (#56)
Browse files Browse the repository at this point in the history
Fix #53
  • Loading branch information
matrixik committed Jul 26, 2021
1 parent ce9859b commit a0807d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
2 changes: 1 addition & 1 deletion slug.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sort"
"strings"

"github.com/rainycape/unidecode"
"github.com/gosimple/unidecode"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion slug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit a0807d1

Please sign in to comment.