lib/nilac/compile_require_statements.rb in nilac-0.0.4.3.9.7.1 vs lib/nilac/compile_require_statements.rb in nilac-0.0.4.3.9.8
- old
+ new
@@ -10,12 +10,14 @@
#
# will compile to
#
# var fs = require('fs')
- modified_file_contents = input_file_contents.collect {|element| replace_strings(element)}
+ modified_file_contents = input_file_contents.clone
- possible_require_calls = modified_file_contents.reject {|element| !element.include?("require")}
+ modified_file_contents = modified_file_contents.collect {|element| element.rstrip + " "*Random.new.rand(1..20) + "\n\n"}
+
+ possible_require_calls = modified_file_contents.reject {|element| !replace_strings(element).include?("require")}
possible_require_calls.each do |statement|
original_statement = input_file_contents[modified_file_contents.index(statement)]
\ No newline at end of file