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
|
string.gsub!(/\ba$/, '') && string.rstrip! # doesn't make sense for an 'a' at the end to be a 1 |
|
string.gsub!(/(^|\W)\ba\b(?=$|\W)(?! (?:#{ALL_ORDINALS_REGEX}))/i, '\1<num>' + 1.to_s) |
|
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.
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
ashould be replaced withan?to cover both articles.Occurrences
numerizer/lib/providers/english_provider.rb
Line 110 in 31c1b1f
numerizer/lib/providers/english_provider.rb
Line 124 in 31c1b1f
numerizer/lib/providers/english_provider.rb
Line 126 in 31c1b1f
Resolution
I could make a PR if there's consensus that this needs to be fixed.