Avoid putting a space in empty comments
In our pipeline, empty comments in po files are generated without a space after '#' and saving a po file using pofile lib generates unwanted diff that need to be handle manually which is really annoying. This pull request simply trim the comment line.
This commit is contained in:
parent
9689ae5b7f
commit
0fcff887fe
@ -20,12 +20,12 @@ PO.prototype.toString = function () {
|
||||
|
||||
if (this.comments) {
|
||||
this.comments.forEach(function (comment) {
|
||||
lines.push('# ' + comment);
|
||||
lines.push(('# ' + comment).trim());
|
||||
});
|
||||
}
|
||||
if (this.extractedComments) {
|
||||
this.extractedComments.forEach(function (comment) {
|
||||
lines.push('#. ' + comment);
|
||||
lines.push(('#. ' + comment).trim());
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user