mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibJS+LibUnicode: Store parsed Unicode locale data as full strings
Originally, it was convenient to store the parsed Unicode locale data as views into the original string being parsed. But to implement locale aliases will require mutating the data that was parsed. To prepare for that, store the parsed data as proper strings.
This commit is contained in:
parent
caf5b6fa6f
commit
d13142f015
Notes:
sideshowbarker
2024-07-18 04:57:50 +09:00
Author: https://github.com/trflynn89
Commit: d13142f015
Pull-request: https://github.com/SerenityOS/serenity/pull/9705
Reviewed-by: https://github.com/linusg ✅
4 changed files with 22 additions and 22 deletions
|
@ -19,7 +19,7 @@ namespace JS::Intl {
|
|||
// 6.2.2 IsStructurallyValidLanguageTag ( locale ), https://tc39.es/ecma402/#sec-isstructurallyvalidlanguagetag
|
||||
static Optional<Unicode::LocaleID> is_structurally_valid_language_tag(StringView locale)
|
||||
{
|
||||
auto contains_duplicate_variant = [](Vector<StringView>& variants) {
|
||||
auto contains_duplicate_variant = [](auto& variants) {
|
||||
if (variants.is_empty())
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue