mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
LibJS: Fix that a windows-style new line was not escaped properly
This commit is contained in:
parent
ba622cffe4
commit
4cc95ae39d
1 changed files with 3 additions and 0 deletions
|
@ -549,6 +549,9 @@ Token Lexer::next()
|
|||
while (m_current_char != stop_char && m_current_char != '\r' && m_current_char != '\n' && !is_eof()) {
|
||||
if (m_current_char == '\\') {
|
||||
consume();
|
||||
if (m_current_char == '\r' && m_position < m_source.length() && m_source[m_position] == '\n') {
|
||||
consume();
|
||||
}
|
||||
}
|
||||
consume();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue