mirror of
https://github.com/tiennm99/awesome-advent-of-code.git
synced 2026-10-14 16:16:55 +00:00
update-badge: fix external link parsing
This commit is contained in:
1 parent
dd850da3d0
commit
7ee935c6ed
6 files changed
+13
-19
No files matched your search
@@ -92,14 +92,8 @@ function parseGithubRepos (lines) {
|
||||
}
|
||||
|
||||
function otherDomain (line) {
|
||||
return (
|
||||
!(
|
||||
line.indexOf('[') < line.indexOf('/') &&
|
||||
line.indexOf(']') > line.indexOf('/')
|
||||
) ||
|
||||
line.indexOf('gitlab.com') !== -1 ||
|
||||
line.indexOf('gist.github.com') !== -1
|
||||
)
|
||||
const match = line.match(/\[[^\[\]\s]+\]\((?<link>[^\(\)\s]+)\)/)
|
||||
return match !== null && !match.groups.link.startsWith('https://github.com/')
|
||||
}
|
||||
|
||||
function generateLine (repo) {
|
||||
|
||||
Reference in new issue
Block a user