We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8437d77 + e75f22f commit 96677b2Copy full SHA for 96677b2
1 file changed
lib/jammit/compressor.rb
@@ -99,7 +99,7 @@ def compile_jst(paths)
99
base_path = find_base_path(paths)
100
compiled = paths.map do |path|
101
contents = read_binary_file(path)
102
- contents = contents.gsub(/\n/, "\\n").gsub("'", '\\\\\'')
+ contents = contents.gsub(/\r?\n/, "\\n").gsub("'", '\\\\\'')
103
name = template_name(path, base_path)
104
"#{namespace}['#{name}'] = #{Jammit.template_function}('#{contents}');"
105
end
0 commit comments