소스 검색

Build: Strip extra line breaks.

Mr.doob 9 년 전
부모
커밋
62e2bc7eb2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      utils/build/build.py

+ 1 - 1
utils/build/build.py

@@ -63,7 +63,7 @@ def main(argv=None):
 					tmp.write(u'THREE.ShaderChunk[ \'' + os.path.splitext(os.path.basename(filename))[0] + u'\'] = "')
 					text = f.read()
 					text = re.sub(r"\t*//.*\n", "", text) # strip comments
-					text = text.replace('\n','\\n') # line breaks to \n
+					text = re.sub(r"\n+", '\\\\n', text) # line breaks to \n
 					tmp.write(text)
 					tmp.write(u'";\n\n')
 				else: