From 4eb4b06688e676ac7d37b9f6013f98ad5d75a956 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 28 Jul 2021 19:38:57 -0400 Subject: [PATCH] LibUnicode: Do not replace underscores in property names Originally, this was done to make the generated enums look more like the rest of Serenity's enums. But for Unicode property escapes, LibUnicode will need to compare property names from a RegExp.prototype object to these parsed property names, which will be easier without this modification. --- .../LibUnicode/CodeGenerators/GenerateUnicodeData.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibUnicode/CodeGenerators/GenerateUnicodeData.cpp b/Userland/Libraries/LibUnicode/CodeGenerators/GenerateUnicodeData.cpp index b0caabb32f..66acb2af51 100644 --- a/Userland/Libraries/LibUnicode/CodeGenerators/GenerateUnicodeData.cpp +++ b/Userland/Libraries/LibUnicode/CodeGenerators/GenerateUnicodeData.cpp @@ -166,8 +166,7 @@ static void parse_prop_list(Core::File& file, PropList& prop_list) VERIFY(segments.size() == 2); auto code_point_range = segments[0].trim_whitespace(); - auto property = segments[1].trim_whitespace().to_string(); - property.replace("_", "", true); + auto property = segments[1].trim_whitespace(); auto& code_points = prop_list.ensure(property);