lib/nilac/compile_hashes.rb in nilac-0.0.4.3.9.7.1 vs lib/nilac/compile_hashes.rb in nilac-0.0.4.3.9.8
- old
+ new
@@ -12,10 +12,12 @@
input_file_contents = input_file_contents.collect {|line| replace_strings(line)}
possible_hashes = input_file_contents.reject { |element| !element.include?("{") }
+ possible_hashes = possible_hashes.reject {|element| element.include?("loop")}
+
possible_multiline_hashes = possible_hashes.reject { |element| element.include?("}") }
possible_multiline_hashes = possible_multiline_hashes.reject {|element| element.index(javascript_regexp) != nil}
multiline_hashes = []
@@ -66,10 +68,10 @@
end
def compile_inline_hashes(input_file_contents)
- javascript_regexp = /(if |while |for |function |function\(|%[qQw]*\{|lambda\s*\{|\s*->\s*\{)/
+ javascript_regexp = /(if |while |for |function |function\(|%[qQw]*\{|lambda\s*\{|\s*->\s*\{|loop\s*)/
modified_file_contents = input_file_contents.clone.collect {|element| replace_strings(element)}
possible_inline_hashes = modified_file_contents.reject {|element| element.count("{") != 1}
\ No newline at end of file