mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-22 13:53:43 -04:00
Removed unnecessary non-null hints
This commit is contained in:
@@ -70,14 +70,14 @@ export function fetchSourceFacts(
|
||||
): Observable<SourceFacts> {
|
||||
|
||||
/* Try to match GitHub repository */
|
||||
let match = url.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i)!
|
||||
let match = url.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i)
|
||||
if (match) {
|
||||
const [, user, repo] = match
|
||||
return fetchSourceFactsFromGitHub(user, repo)
|
||||
}
|
||||
|
||||
/* Try to match GitLab repository */
|
||||
match = url.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i)!
|
||||
match = url.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i)
|
||||
if (match) {
|
||||
const [, base, slug] = match
|
||||
return fetchSourceFactsFromGitLab(base, slug)
|
||||
|
||||
Reference in New Issue
Block a user