Fix parsing of comments in arrays of sponsor info, fixes composer/packagist#1473
parent
e0ed22bbd0
commit
e02f7ba58b
|
@ -235,7 +235,7 @@ class GitHubDriver extends VcsDriver
|
||||||
$key = $match[1];
|
$key = $match[1];
|
||||||
continue;
|
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) {
|
foreach (array_map('trim', Preg::split('{[\'"]?\s*,\s*[\'"]?}', $match2[1])) as $item) {
|
||||||
$result[] = ['type' => $match[1], 'url' => trim($item, '"\' ')];
|
$result[] = ['type' => $match[1], 'url' => trim($item, '"\' ')];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue