提交 2f0e8525 编写于 作者: M Mr.doob

build.py: more comments removal

上级 28fb2072
......@@ -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) # remove //
text = re.sub(r"[ \t]*\/\*[\s\S]*\*\/\n", "", text) # remove /* */
text = re.sub(r"[ \t]*\/\*[\s\S]*\*\/\n?", "", text) # remove /* */
text = re.sub(r"\n+", '\\\\n', text) # \n+ to \n
tmp.write(text)
tmp.write(u'";\n\n')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册