You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Humanizer in a kotlin project recently and was trying to use the pluralize method however I ran into an interesting bug.
val result =Humanize.pluralize(
"string with a single thing",
"string with {1} things",
"string with no things",
3,
"three"
)
println(result)
// => "string with three things"
This usage properly works and will template the value three into the many parameter.
However, if I add an apostrophe somewhere in the string, the templating no longer works,
and the apostrophe is removed.
val result =Humanize.pluralize(
"string with a single thing",
"can't use string with {1} things",
"string with no things",
3,
"three"
)
println(result)
// => "cant use string with {1} things"
The text was updated successfully, but these errors were encountered:
I've been using Humanizer in a kotlin project recently and was trying to use the
pluralize
method however I ran into an interesting bug.This usage properly works and will template the value three into the
many
parameter.However, if I add an apostrophe somewhere in the string, the templating no longer works,
and the apostrophe is removed.
The text was updated successfully, but these errors were encountered: