diff --git a/lib/impl/CodeGenerator.js b/lib/impl/CodeGenerator.js index 67a3138..ad8cd7d 100644 --- a/lib/impl/CodeGenerator.js +++ b/lib/impl/CodeGenerator.js @@ -19,7 +19,7 @@ function generateFile (context, filePath) { code = code .replace(/\\/g, '\\\\') .replace(/'/g, '\\\'') - .replace(/(\r)?\n/g, '\\n\\\n') + .replace(/(\r\n|[\n\r])/g, '\\n\\\n') // Transform the source path so that they display well in the browser debugger.