ソースを参照

js: Insert newline after each line in REPL mode

This makes ASI work in the REPL.
yeeter-the-dog 4 年 前
コミット
3ccf4dc7ad
1 ファイル変更1 行追加0 行削除
  1. 1 0
      Userland/Utilities/js.cpp

+ 1 - 0
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 {