Просмотр исходного кода

Split lines on Windows line endings too

James Allen 12 лет назад
Родитель
Сommit
049dcc2780

+ 1 - 1
services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee

@@ -102,7 +102,7 @@ readFileIntoTextArray = (path, callback)->
 		if error?
 			logger.err path:path, "error reading file into text array"
 			return callback(err)
-		lines = content.split("\n")
+		lines = content.split(/\r\n|\n|\r/)
 		callback error, lines