From 9c2494dacc32cb1f719ea36232e663bee8689391 Mon Sep 17 00:00:00 2001 From: Filyus Date: Wed, 19 Aug 2020 15:06:25 +0500 Subject: [PATCH] Line Breaks fix --- lib/impl/CodeGenerator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.