diff --git a/lib/po.js b/lib/po.js index 50cb0a1..87133b5 100644 --- a/lib/po.js +++ b/lib/po.js @@ -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()