Merge pull request #8 from saelfaer/master

Update parsing of headers
This commit is contained in:
Mike Holly 2013-10-31 07:01:13 -07:00
commit e964e6e927

View File

@ -81,7 +81,7 @@ PO.parse = function(data) {
header = header.trim().replace(/^"/, '').replace(/\\n"$/, ''); header = header.trim().replace(/^"/, '').replace(/\\n"$/, '');
var p = header.split(/:/) var p = header.split(/:/)
, name = p.shift().trim() , name = p.shift().trim()
, value = p.join(':').trim().replace(/n$/); , value = p.join(':').trim();
po.headers[name] = value; po.headers[name] = value;
} }
}); });
@ -202,4 +202,4 @@ PO.Item.prototype.toString = function() {
return lines.join("\n"); return lines.join("\n");
}; };
module.exports = PO; module.exports = PO;