lib/nilac/replace_multiline_comments.rb in nilac-0.0.4.3.9.6 vs lib/nilac/replace_multiline_comments.rb in nilac-0.0.4.3.9.7
- old
+ new
@@ -1,9 +1,7 @@
require_relative "find_file_name"
-
require_relative "find_file_path"
-
require_relative "read_file_line_by_line"
def replace_multiline_comments(input_file_contents, nila_file_path, *output_js_file_path)
#This method will replace both the single and multiline comments
@@ -60,9 +58,15 @@
end
temporary_nila_file = find_file_path(nila_file_path, ".nila") + "temp_nila.nila"
+
+ if File.exist?(temporary_nila_file)
+
+ File.delete(temporary_nila_file)
+
+ end
if output_js_file_path.empty?
output_js_file = find_file_path(nila_file_path, ".nila") + find_file_name(nila_file_path, ".nila") + ".js"
\ No newline at end of file