Support multiple spaces after msgid

This commit is contained in:
Remko Tronçon
2021-12-01 09:48:24 +01:00
parent ff1b888af1
commit 685be92923
5 changed files with 31 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
# some comment
msgid "First id, no header"
msgstr ""
msgid "A second string"
msgstr ""

View File

@@ -70,4 +70,24 @@ describe('PO files with no headers', function () {
assert.equal(po.items.length, 2);
});
});
describe('advanced example with extra spaces', function () {
var po;
before(function (done) {
PO.load(__dirname + '/fixtures/no_header_extra_spaces.po', function (err, result) {
assert.equal(err, null);
po = result;
done();
});
});
it('Parses the po file', function () {
assert.notEqual(po, null);
});
it('Finds all items', function () {
assert.equal(po.items.length, 2);
});
});
});