#462 fix, remove leading and trailing dashes from urlized slug. includes test changes

This commit is contained in:
Joel Scoble
2014-10-02 17:25:52 -05:00
committed by spf13
parent f52e662890
commit 4b9e4c90d9
2 changed files with 14 additions and 6 deletions

View File

@@ -46,7 +46,7 @@ Leading
"Development",
"VIM"
],
"slug": "spf13-vim-3-0-release-and-new-website"
"slug": "-spf13-vim-3-0-release-and-new-website-"
}
Content of the file goes Here
@@ -566,13 +566,13 @@ func TestLayoutOverride(t *testing.T) {
}
func TestSliceToLower(t *testing.T) {
tests := []struct{
value []string
tests := []struct {
value []string
expected []string
}{
{[]string{"a","b","c"}, []string{"a", "b", "c"}},
{[]string{"a","B","c"}, []string{"a", "b", "c"}},
{[]string{"A","B","C"}, []string{"a", "b", "c"}},
{[]string{"a", "b", "c"}, []string{"a", "b", "c"}},
{[]string{"a", "B", "c"}, []string{"a", "b", "c"}},
{[]string{"A", "B", "C"}, []string{"a", "b", "c"}},
}
for _, test := range tests {