1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Fix Unicode issue in Slicestr and Substr

Fixes #1333
This commit is contained in:
Bjørn Erik Pedersen
2015-08-07 08:52:22 +02:00
parent de7dd70bbc
commit c7aa881d90
2 changed files with 22 additions and 16 deletions

View File

@@ -368,6 +368,7 @@ func TestSlicestr(t *testing.T) {
{"abcdef", []int{-1, 7}, false},
{"abcdef", []int{1, -1}, false},
{tstNoStringer{}, []int{0, 1}, false},
{"ĀĀĀ", []int{0, 1}, "Ā"}, // issue #1333
} {
result, err := Slicestr(this.v1, this.v2...)
@@ -422,6 +423,7 @@ func TestSubstr(t *testing.T) {
{"abcdef", 2.0, nil, false},
{"abcdef", 2.0, 2, false},
{"abcdef", 2, 2.0, false},
{"ĀĀĀ", 1, 2, "ĀĀ"}, // # issue 1333
} {
var result string
n = i