mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibJS: Fix that windows style line endings were not ignored or converted
These are tested by test262 but the current test262-runner reads the files in python which automatically converts \r\n to \n. This meant that we passed the tests while we should not have.
This commit is contained in:
parent
f2512071f2
commit
3fee7b0d0b
Notes:
sideshowbarker
2024-07-18 04:38:13 +09:00
Author: https://github.com/davidot
Commit: 3fee7b0d0b
Pull-request: https://github.com/SerenityOS/serenity/pull/9846
Reviewed-by: https://github.com/linusg ✅
4 changed files with 51 additions and 1 deletions
|
@ -1271,7 +1271,7 @@ NonnullRefPtr<TemplateLiteral> Parser::parse_template_literal(bool is_tagged)
|
|||
auto token = consume();
|
||||
expressions.append(parse_string_literal(token, true));
|
||||
if (is_tagged)
|
||||
raw_strings.append(create_ast_node<StringLiteral>({ m_state.current_token.filename(), rule_start.position(), position() }, token.value()));
|
||||
raw_strings.append(create_ast_node<StringLiteral>({ m_state.current_token.filename(), rule_start.position(), position() }, token.raw_template_value()));
|
||||
} else if (match(TokenType::TemplateLiteralExprStart)) {
|
||||
consume(TokenType::TemplateLiteralExprStart);
|
||||
if (match(TokenType::TemplateLiteralExprEnd)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue