Browse Source

[js] include semicolon after newline for included js files (#7648)

close #6975
Mark Knol 6 năm trước cách đây
mục cha
commit
c4209eb454
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/generators/genjs.ml

+ 2 - 2
src/generators/genjs.ml

@@ -1399,7 +1399,7 @@ let generate com =
 		match file with
 		| path, "top" ->
 			let file_content = Std.input_file ~bin:true (fst file) in
-			print ctx "%s\n" file_content;
+			print ctx "%s\n;" file_content;
 			()
 		| _ -> ()
 	) include_files;
@@ -1467,7 +1467,7 @@ let generate com =
 		match file with
 		| path, "closure" ->
 			let file_content = Std.input_file ~bin:true (fst file) in
-			print ctx "%s\n" file_content;
+			print ctx "%s\n;" file_content;
 			()
 		| _ -> ()
 	) include_files;