1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-28 09:20:52 +01:00

Fixed GitLab star count

This commit is contained in:
squidfunk 2020-04-17 14:33:04 +02:00
parent 387970c611
commit 5b8721ff92

View File

@ -74,8 +74,8 @@ function fetchSourceFacts(
/* GitLab repository */
case "gitlab":
const [, base, project] = url.match(/^.+?([^\/]*gitlab[^\/]+)\/(.+)/i)
return fetchSourceFactsFromGitLab(base, project)
const [, base, slug] = url.match(/^.+?([^\/]*gitlab[^\/]+)\/(.+?)\/?$/i)
return fetchSourceFactsFromGitLab(base, slug)
/* Everything else */
default: