mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 19:34:59 +00:00
LibUnicode: Parse numbers in number formats a bit more leniently
The parser was previously expecting number sections within a pattern to start with "#", but they may also begin with "0".
This commit is contained in:
parent
f88b4dfb58
commit
6cfd63e5bd
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ static void parse_number_pattern(String pattern, UnicodeLocaleData& locale_data,
|
|||
{ "¤"sv, "{currencyCode}"sv }, // U+00A4 Currency Sign
|
||||
};
|
||||
|
||||
if (auto start_number_index = pattern.find('#'); start_number_index.has_value()) {
|
||||
if (auto start_number_index = pattern.find_any_of("#0"sv, String::SearchDirection::Forward); start_number_index.has_value()) {
|
||||
auto end_number_index = *start_number_index + 1;
|
||||
|
||||
for (; end_number_index < pattern.length(); ++end_number_index) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue