Closed ronnix closed 2 months ago
@ronnix Sorry for dropping the ball on my part here... Could you rebase this? :)
@akx done!
@akx I fixed the linter error
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.69%. Comparing base (
e0d1018
) to head (181d701
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Context
The French group separator is
"\u202f"
(narrow non-breaking space), but when parsing numbers in the real world, you will most often encounter either a regular space character (" "
) or a non-breaking space character ("\xa0"
).The issue was partially adressed earlier in https://github.com/python-babel/babel/issues/637, but only to allow regular spaces instead of non-breaking spaces
"\xa0"
inparse_decimal
.Contents
This PR goes further by changing both
parse_number
andparse_decimal
to allowany other space character (using theany of those 3 space characters when the expected group symbol is itself one such space character, but is not present in the string to parse.\s
character class of regular expressions)Unit tests are included.