mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibJS: Correctly handle Unicode characters in JS source text
Also recognize additional white space characters.
This commit is contained in:
@@ -120,8 +120,8 @@ public:
|
||||
String source_string { source };
|
||||
source_string.replace("\r\n", "\n");
|
||||
source_string.replace("\r", "\n");
|
||||
source_string.replace(LINE_SEPARATOR, "\n");
|
||||
source_string.replace(PARAGRAPH_SEPARATOR, "\n");
|
||||
source_string.replace(LINE_SEPARATOR_STRING, "\n");
|
||||
source_string.replace(PARAGRAPH_SEPARATOR_STRING, "\n");
|
||||
StringBuilder builder;
|
||||
builder.append(source_string.split_view('\n', true)[position.value().line - 1]);
|
||||
builder.append('\n');
|
||||
|
||||
Reference in New Issue
Block a user