File tree Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public virtual string GenerateSlug(string inputString)
3434 var normalizedInput = inputString . Normalize ( NormalizationForm . FormD ) ;
3535
3636 normalizedInput = Config . TrimWhitespace ? normalizedInput . Trim ( ) : normalizedInput ;
37- normalizedInput = Config . ForceLowerCase ? normalizedInput . ToLower ( ) : normalizedInput ;
37+ normalizedInput = Config . ForceLowerCase ? normalizedInput . ToLowerInvariant ( ) : normalizedInput ;
3838
3939 var sb = new StringBuilder ( normalizedInput ) ;
4040
Original file line number Diff line number Diff line change 22 <PropertyGroup >
33 <AssemblyTitle >Slugify Core</AssemblyTitle >
44
5- <VersionPrefix >5.1.0 </VersionPrefix >
5+ <VersionPrefix >5.1.1 </VersionPrefix >
66 <TargetFramework >netstandard2.0</TargetFramework >
77 <LangVersion >latest</LangVersion >
88 <Nullable >enable</Nullable >
1212 <PackageId >Slugify.Core</PackageId >
1313 <PackageTags >URL;Slug;Web;Slugify</PackageTags >
1414 <PackageReleaseNotes >
15+ 5.1.1 - Fixes issue with Turkish `i` character.
1516 5.1.0 - Adds support for MaximumLength to limit the length of the slug. Thanks @ntbm
1617 5.0.0 - Rewrite using newer language features. Added support for Non-Ascii languages for SlugHelperForNonAsciiLanguages
1718 4.0.0 - Bug fix relase from 3.0.0
Original file line number Diff line number Diff line change @@ -704,17 +704,27 @@ public void TestHandlingOfUnicodeCharacters(ISlugHelper helper)
704704 }
705705
706706
707- [ Fact ( Skip = "We are not culture aware and do not support this." ) ]
707+ [ Fact ]
708708 public void TurkishEncodingOfI ( )
709709 {
710- //Set culture to Turkish
711- CultureInfo . CurrentCulture = new CultureInfo ( "tr-TR" ) ;
712- const string original = "FIFA 18" ;
713- const string expected = "fıfa 18" ;
710+ var defaultCulture = CultureInfo . CurrentCulture ;
714711
715- var helper = CreateNonAscii ( ) ;
712+ try
713+ {
714+ //Set culture to Turkish
715+ CultureInfo . CurrentCulture = new CultureInfo ( "tr-TR" ) ;
716+ const string original = "FIFA 18" ;
717+ const string expected = "fifa-18" ;
716718
717- Assert . Equal ( expected , helper . GenerateSlug ( original ) ) ;
719+ var helper = CreateNonAscii ( ) ;
720+
721+ Assert . Equal ( expected , helper . GenerateSlug ( original ) ) ;
722+ }
723+ finally
724+ {
725+ //Reset culture
726+ CultureInfo . CurrentCulture = defaultCulture ;
727+ }
718728
719729 }
720730
You can’t perform that action at this time.
0 commit comments