Skip to content

Commit

Permalink
bugfix: Fix sluggy base method and updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Mateus committed May 26, 2020
1 parent 8bf75c0 commit c772e48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion Sluggy.Tests/Strategies/NonAlphaNumericStrategyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class NonAlphaNumericStrategyTests
[Trait("Project", "Sluggy")]
[Theory(DisplayName = "Should remove nonalphanumeric characters from string")]
[InlineData("<>*.,;´`'~^!#%$&/()=}{[]@£€§¨+|", "")]
[InlineData("a<>*.,;´`'~^!#%$&/()=}{[]@£€§¨+| -a", "a a")]
[InlineData("a<>*.,;´`'~^!#%$&/()=}{[]@£€§¨+|-ba", "aba")]
[InlineData("", "")]
public void ShouldNormalize(string value, string expectation)
{
Expand Down
1 change: 0 additions & 1 deletion Sluggy/Sluggy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public static string ToSlug(this string text, string separator, ITranslationStra

return text
.Split()
.Where(t => t.Length != 0)
.Select(t => strategy.Translate(t))
.Where(t => t.Length != 0)
.Join(separator);
Expand Down

0 comments on commit c772e48

Please sign in to comment.