1
0
Fork 0

Fix parsing of comments in arrays of sponsor info, fixes composer/packagist#1473

pull/12180/head^2
Jordi Boggiano 2024-10-28 21:58:03 +01:00
parent e0ed22bbd0
commit e02f7ba58b
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ class GitHubDriver extends VcsDriver
$key = $match[1];
continue;
}
if (Preg::isMatchStrictGroups('{^\[(.*)\](?:\s*#.*)?$}', $match[2], $match2)) {
if (Preg::isMatchStrictGroups('{^\[(.*?)\](?:\s*#.*)?$}', $match[2], $match2)) {
foreach (array_map('trim', Preg::split('{[\'"]?\s*,\s*[\'"]?}', $match2[1])) as $item) {
$result[] = ['type' => $match[1], 'url' => trim($item, '"\' ')];
}