/trunk/shared/php_includes/common_functions.inc.php |
---|
264,7 → 264,7 |
function github_commit_count($user, $repo) { |
$cont = file_get_contents("https://github.com/$user/$repo"); |
if (preg_match('@<strong>(\\d+)</strong>\s*<span aria-label="Commits on master">commits</span>@smU', $cont, $m)) { |
if (preg_match('@<strong>(\\d+)</strong>\s*<span[^>]+aria-label="Commits on master"[^>]*>commits</span>@smU', $cont, $m)) { |
return $m[1]; |
} else { |
return "?"; |