On Windows, gvim and notepad create text files with \r\n line endings instead of \n. The nodejs implementation splits the file based on \n leaving the \r behind. These \r can be inside of generated strings, causing the generated javascript to fail to parse.
The solution is to use regular express /\r?\n/ to split the string.
I examined the python and ruby implementations, but I do not believe they have the same problem since they are using "readline" and "gets" api respectively, which should handle both line endings.
On Windows, gvim and notepad create text files with \r\n line endings instead of \n. The nodejs implementation splits the file based on \n leaving the \r behind. These \r can be inside of generated strings, causing the generated javascript to fail to parse.
The solution is to use regular express /\r?\n/ to split the string.
I examined the python and ruby implementations, but I do not believe they have the same problem since they are using "readline" and "gets" api respectively, which should handle both line endings.