Skip to content

Commit

Permalink
remove redundant defaultSeparator from OxfordStyleCollectionFormatter (
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Feb 23, 2024
1 parent 745a763 commit 23890ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Humanizer/Configuration/CollectionFormatterRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class CollectionFormatterRegistry : LocaliserRegistry<ICollectionFormatter>
public CollectionFormatterRegistry()
: base(new DefaultCollectionFormatter("&"))
{
Register("en", new OxfordStyleCollectionFormatter("and"));
Register("en", new OxfordStyleCollectionFormatter());
Register("it", new DefaultCollectionFormatter("e"));
Register("de", new DefaultCollectionFormatter("und"));
Register("dk", new DefaultCollectionFormatter("og"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Humanizer
{
class OxfordStyleCollectionFormatter(string defaultSeparator) :
DefaultCollectionFormatter(defaultSeparator ?? "and")
class OxfordStyleCollectionFormatter() :
DefaultCollectionFormatter("and")
{
protected override string GetConjunctionFormatString(int itemCount) => itemCount > 2 ? "{0}, {1} {2}" : "{0} {1} {2}";
}
Expand Down

0 comments on commit 23890ae

Please sign in to comment.