Преглед изворни кода

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 {