-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Describe the bug.
Running npm run test:editlinks generates 404 links for some spec pages.
File: scripts/markdown/check-edit-links.ts
Proposed fixes
Dynamically detect available versions from the filesystem.
-
Resolve the specification directory at runtime (
reference/specification/, derived fromprocess.cwd()). -
Read directory contents using Node’s
fsmodule. -
Detect specification versions by matching entries against a semantic version pattern:
v\d+\.\d+\.\d+for folders, orv\d+\.\d+\.\d+\.mdfor files.
- Normalize file paths (
\→/) before comparisons so behavior is consistent across platforms. - Pass the discovered version list to
determineEditLink, allowing it to automatically generate GitHub edit links for any valid spec version without maintaining a manual allowlist.
Expected behavior
- Files outside the ignore list are checked for broken edit links.
- Files returning 404 are logged with their file paths.
- All other links are considered valid.
Screenshots
After making the proposed changes, running npm run test:editlinks confirms that all edit links are valid
How to Reproduce
npm installnpm run test:editlinks
🖥️ Device Information [optional]
- Operating System (OS): Windows
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To Be Triaged