diff --git a/lib/po.js b/lib/po.js index 876f18f..a4d0e07 100644 --- a/lib/po.js +++ b/lib/po.js @@ -10,7 +10,7 @@ PO.prototype.save = function(filename, callback) { fs.writeFile(filename, this.toString(), function(err){ if (err) throw err; callback && callback(); - }) + }); }; PO.prototype.toString = function() { @@ -64,6 +64,7 @@ PO.Item = function() { this.references = []; this.msgid_plural = null; this.msgstr = []; + this.comments = []; }; PO.Item.prototype.toString = function() { @@ -112,7 +113,7 @@ PO.Item.prototype.toString = function() { PO.Item.parse = function(chunk) { var item = new PO.Item(); - var parts = chunk.split(/\nmsg/); + var parts = chunk.split(/msg/); var _extract = function(string) { var lines = string.split(/\n/); diff --git a/package.json b/package.json index ce9964d..34d84a6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name" : "node-po", "description" : "Simple library for loading and saving Gettext PO files.", - "version" : "0.0.2", + "version" : "0.0.4", "author" : "Mike Holly", "homepage" : "http://github.com/mikejholly/node-po", "repository" : {"type" : "git", "url" : "http://github.com/mikejholly/node-po.git"},