added support for CRLF files - window style

This commit is contained in:
elewinso 2013-09-12 14:01:37 +03:00
parent 3eab1ece05
commit 47adb2be9e

View File

@ -55,6 +55,8 @@ PO.load = function(filename, callback) {
};
PO.parse = function(data) {
//support both unix and windows newline formats.
data = data.replace(/\r\n/g, '\n');
var po = new PO
, sections = data.split(/\n\n/)
, headers = sections.shift()