Fixed parsing error.
This commit is contained in:
@@ -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/);
|
||||
|
||||
Reference in New Issue
Block a user