diff options
author | yeeter-the-dog <86205456+yeeter-the-dog@users.noreply.github.com> | 2021-06-20 13:58:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-20 21:58:57 +0100 |
commit | 3ccf4dc7ad4c64c0ccff7c7098bb44446bc89b14 (patch) | |
tree | 88be82323d5792124b95f350224dba9b0d1a559a | |
parent | 54852832b192978fc873f74038e80792a476385e (diff) | |
download | serenity-3ccf4dc7ad4c64c0ccff7c7098bb44446bc89b14.zip |
js: Insert newline after each line in REPL mode
This makes ASI work in the REPL.
-rw-r--r-- | Userland/Utilities/js.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 69e45a178d..a4beb6ff20 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -121,6 +121,7 @@ static String read_next_piece() s_editor->add_to_history(line); piece.append(line); + piece.append('\n'); auto lexer = JS::Lexer(line); enum { |