From 47adb2be9e331e605b5c0ba580a3053bb6ccb7e4 Mon Sep 17 00:00:00 2001 From: elewinso Date: Thu, 12 Sep 2013 14:01:37 +0300 Subject: [PATCH] added support for CRLF files - window style --- lib/po.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/po.js b/lib/po.js index 2accd8f..c52077f 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()