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

@@ -80,7 +80,7 @@ PO.parse = function (data) {
var headers = [];
//everything until the first 'msgid ""' is considered header
while (sections[0] && (headers.length === 0 || headers[headers.length - 1].indexOf('msgid ""') < 0)) {
if (sections[0].match(/msgid "[^"]/)) {
if (sections[0].match(/msgid\s+"[^"]/)) {
//found first real string, adding a dummy header item
headers.push('msgid ""');
} else {