From 1e13e78654d5b9e101e0325b5122796ef9664826 Mon Sep 17 00:00:00 2001 From: Mike Holly Date: Sun, 1 Jan 2012 17:52:51 -0800 Subject: [PATCH] Fixed parsing error. --- lib/po.js | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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"},