mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-04 18:27:42 +00:00
LibRegex+Everywhere: Make LibRegex more unicode-aware
This commit makes LibRegex (mostly) capable of operating on any of the three main string views: - StringView for raw strings - Utf8View for utf-8 encoded strings - Utf32View for raw unicode strings As a result, regexps with unicode strings should be able to properly handle utf-8 and not stop in the middle of a code point. A future commit will update LibJS to use the correct type of string depending on the flags.
This commit is contained in:
committed by
Ali Mohammad Pur
parent
e5af15a6e9
commit
f364fcec5d
@@ -417,7 +417,7 @@ private:
|
||||
|
||||
StringBuilder result;
|
||||
for (auto& e : match.capture_group_matches[0])
|
||||
result.append(e.view.u8view());
|
||||
result.append(e.view.string_view());
|
||||
|
||||
return result.build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user