Merge pull request #5 from elewinso/master

added support for CRLF files - window style
This commit is contained in:
Mike Holly 2013-10-31 07:02:48 -07:00
commit f7d70f302b

View File

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