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.
This commit is contained in:
Ryan Griffith 2013-04-05 08:54:31 -03:00
commit 7dcd7c0cb9

View file

@ -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 "";