Comparing version 0.2.5 to 0.2.6
@@ -184,2 +184,8 @@ var fs = require('fs'), | ||
// reverse what extract(string) method during PO.parse does | ||
var _escape = function (string) { | ||
string = string.replace(/\\/g, '\\\\'); | ||
return string.replace(/"/g, '\\"'); | ||
}; | ||
var _process = function (keyword, text, i) { | ||
@@ -192,7 +198,7 @@ var lines = [], | ||
parts.forEach(function (part) { | ||
lines.push('"' + part + '"'); | ||
lines.push('"' + _escape(part) + '"'); | ||
}); | ||
} | ||
else { | ||
lines.push(keyword + index + ' "' + text + '"'); | ||
lines.push(keyword + index + ' "' + _escape(text) + '"'); | ||
} | ||
@@ -199,0 +205,0 @@ return lines; |
{ | ||
"name": "pofile", | ||
"description": "Parse and serialize Gettext PO files.", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"author": { | ||
@@ -11,4 +11,7 @@ "name": "Ruben Vermeersch", | ||
"contributors": [ | ||
"Eyal Lewinsohn", | ||
"Gabe Gorelick", | ||
"Julian Bäume", | ||
"Mike Holly" | ||
"Mike Holly", | ||
"Sander Houttekier" | ||
], | ||
@@ -15,0 +18,0 @@ "homepage": "http://github.com/rubenv/pofile", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13904
219