mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibJS: Correctly handle Unicode characters in JS source text
Also recognize additional white space characters.
This commit is contained in:
parent
4d6502de42
commit
47bc72bcf6
6 changed files with 100 additions and 16 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue