-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Problem
In many places the indefinite article 'a' is manipulated, either by stripping it away or treating it as 1. The article 'an' should be processed in the same way.
In all these regexes a should be replaced with an? to cover both articles.
Occurrences
numerizer/lib/providers/english_provider.rb
Line 110 in 31c1b1f
| string.gsub!(/\ba$/, '') && string.rstrip! # doesn't make sense for an 'a' at the end to be a 1 |
numerizer/lib/providers/english_provider.rb
Line 124 in 31c1b1f
| string.gsub!(/(^|\W)\ba\b(?=$|\W)(?! (?:#{ALL_ORDINALS_REGEX}))/i, '\1<num>' + 1.to_s) |
numerizer/lib/providers/english_provider.rb
Line 126 in 31c1b1f
| string.gsub!(/(^|\W)\ba\b(?=$|\W)/i, '\1<num>' + 1.to_s) |
Resolution
I could make a PR if there's consensus that this needs to be fixed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels