From 7dcd7c0cb9a43feaec43173cd740e704cfafa814 Mon Sep 17 00:00:00 2001 From: Ryan Griffith Date: Fri, 5 Apr 2013 08:54:31 -0300 Subject: [PATCH 1/2] Fixing newline character for text files This addressed an issue where the newlines generated when including snippet files does not contain newline characters, this causes SnippetManager.parseSnippetFile to always return empty. Instead, of creating actual newlines and a multiline string with \, this adds newline characters. --- Makefile.dryice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index e5c73ac0..282b3dac 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -473,7 +473,7 @@ var detectTextModules = function(input, source) { input = input.replace(/\\/g, "\\\\").replace(/"/g, '\\"'); input = input.replace(/\n\s+/g, "\n"); - input = '"' + input.replace(/\r?\n/g, '\\\n') + '"'; + input = '"' + input.replace(/\r?\n/g, '\\n') + '"'; textModules[module] = input; return ""; From 06a74d59dd78a5fb87b061aa1e57f1f9b81fdd34 Mon Sep 17 00:00:00 2001 From: Ryan Griffith Date: Fri, 5 Apr 2013 16:45:20 -0300 Subject: [PATCH 2/2] Slight adjustment to the newline fix I also had to remove this line to get things to work. --- Makefile.dryice.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 282b3dac..48d6591c 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -472,7 +472,6 @@ var detectTextModules = function(input, source) { var module = source.isLocation ? source.path : source; input = input.replace(/\\/g, "\\\\").replace(/"/g, '\\"'); - input = input.replace(/\n\s+/g, "\n"); input = '"' + input.replace(/\r?\n/g, '\\n') + '"'; textModules[module] = input;