fixes #373 aswell
parent
202ca60559
commit
38f866f1dd
|
@ -60,13 +60,18 @@ EOT
|
||||||
|
|
||||||
foreach ($repos->getPackages() as $package) {
|
foreach ($repos->getPackages() as $package) {
|
||||||
foreach ($tokens as $token) {
|
foreach ($tokens as $token) {
|
||||||
if (false === ($pos = strpos($package->getName(), $token))) {
|
if (false === ($pos = strpos($package->getName(), $token)) && (false === strpos(join(',',$package->getKeywords() ?: array()), $token))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = substr($package->getPrettyName(), 0, $pos)
|
if (false !== ($pos = strpos($package->getName(), $token))) {
|
||||||
. '<highlight>' . substr($package->getPrettyName(), $pos, strlen($token)) . '</highlight>'
|
$name = substr($package->getPrettyName(), 0, $pos)
|
||||||
. substr($package->getPrettyName(), $pos + strlen($token));
|
. '<highlight>' . substr($package->getPrettyName(), $pos, strlen($token)) . '</highlight>'
|
||||||
|
. substr($package->getPrettyName(), $pos + strlen($token));
|
||||||
|
} else {
|
||||||
|
$name = $package->getPrettyName();
|
||||||
|
}
|
||||||
|
|
||||||
$version = $installedRepo->hasPackage($package) ? '<info>'.$package->getPrettyVersion().'</info>' : $package->getPrettyVersion();
|
$version = $installedRepo->hasPackage($package) ? '<info>'.$package->getPrettyVersion().'</info>' : $package->getPrettyVersion();
|
||||||
|
|
||||||
$packages[$name][$package->getPrettyVersion()] = $version;
|
$packages[$name][$package->getPrettyVersion()] = $version;
|
||||||
|
|
Loading…
Reference in New Issue