| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ import assert from 'node:assert'; | |||
| 6 | 6 | import { open } from 'node:fs/promises'; | |
| 7 | 7 | import { argv } from 'node:process'; | |
| 8 | 8 | ||
| 9 | - const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/\1\) -$/; | ||
| 9 | + const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/(.+)\) -$/; | ||
| 10 | 10 | const memberInfoLine = /^ {2}\*\*[^*]+\*\* <<[^@]+@.+\.[a-z]+>>( \(\w+(\/[^)/]+)+\))?( - \[Support me\]\(.+\))?$/; | |
| 11 | 11 | ||
| 12 | 12 | const lists = { | |
@@ -59,9 +59,11 @@ for await (const line of readme.readLines()) { | |||
| 59 | 59 | ); | |
| 60 | 60 | } | |
| 61 | 61 | ||
| 62 | - if (!ghHandleLine.test(line)) { | ||
| 63 | - throw new Error(`${currentGithubHandle} is not formatted correctly (README.md:${lineNumber})`); | ||
| 62 | + const match = line.match(ghHandleLine); | ||
| 63 | + if (!match) { | ||
| 64 | + throw new Error(`${line} should match ${ghHandleLine} (README.md:${lineNumber})`); | ||
| 64 | 65 | } | |
| 66 | + assert.strictEqual(match[1], match[2], `GitHub handle does not match the URL (README.md:${lineNumber})`); | ||
| 65 | 67 | ||
| 66 | 68 | if ( | |
| 67 | 69 | currentList === 'TSC voting members' || | |
| Back | FazBrowse Home | New Git URL |
0 commit comments