Commit 9846720e by Trey Smith Committed by Timothée Peignier

fix #107 -- rather than deleting newlines in template strings, escape them

parent 1c76df54
......@@ -91,7 +91,7 @@ class Compressor(object):
base_path = self.base_path(paths)
for path in paths:
contents = self.read_file(path)
contents = re.sub(r"\r?\n", "", contents)
contents = re.sub(r"\r?\n", "\\\\n", contents)
contents = re.sub(r"'", "\\'", contents)
name = self.template_name(path, base_path)
compiled += "%s['%s'] = %s('%s');\n" % (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment