From d7bcfb415b4d79bff1b51a645978330e516c8cef Mon Sep 17 00:00:00 2001 From: shortcutme Date: Tue, 9 Apr 2019 15:06:09 +0200 Subject: [PATCH] Fix js merging white space stripping --- src/Debug/DebugMedia.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Debug/DebugMedia.py b/src/Debug/DebugMedia.py index af52c9dd..a24203b9 100644 --- a/src/Debug/DebugMedia.py +++ b/src/Debug/DebugMedia.py @@ -70,14 +70,14 @@ def merge(merged_path): if os.path.isfile(merged_path): # Find old parts to avoid unncessary recompile merged_old = open(merged_path, "rb").read() for match in re.findall(rb"(/\* ---- (.*?) ---- \*/(.*?)(?=/\* ----|$))", merged_old, re.DOTALL): - old_parts[match[1].decode()] = match[2].strip(rb"\n\r") + old_parts[match[1].decode()] = match[2].strip(b"\n\r") logging.debug("Merging %s (changed: %s, old parts: %s)" % (merged_path, changed, len(old_parts))) # Merge files parts = [] s_total = time.time() for file_path in findfiles(merge_dir, find_ext): - parts.append(b"\n\n/* ---- %s ---- */\n\n" % file_path.replace(config.data_dir, "").encode("utf8")) + parts.append(b"\n/* ---- %s ---- */\n\n" % file_path.replace(config.data_dir, "").encode("utf8")) if file_path.endswith(".coffee"): # Compile coffee script if file_path in changed or file_path.replace(config.data_dir, "") not in old_parts: # Only recompile if changed or its not compiled before if config.coffeescript_compiler is None: