Skip to content

feat(scripts): recognize autolinks in check-links.py (Closes #2509) - #2871

Closed
d-morrison wants to merge 1 commit into
mainfrom
fix/issue-2509-table-header-autolinks
Closed

feat(scripts): recognize autolinks in check-links.py (Closes #2509)#2871
d-morrison wants to merge 1 commit into
mainfrom
fix/issue-2509-table-header-autolinks

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Summary

Closes #2509.

Update scripts/check-links.py to recognize CommonMark autolinks (<https://...>, <mailto:...>, <user@example.com>) inside markdown table header cells (| <https://github.com> | Header 2 |), while skipping external targets and preserving link validation integrity.

Changes

  • scripts/check-links.py:
    • Added AUTOLINK regex and extract_targets() helper.
    • Stripped standard inline links before scanning autolinks to prevent duplicate targets for pointy bracket link destinations ([text](<url>)).
    • Added bare email recognition to is_external().
    • Added check_target() helper with safe relative path formatting.
  • scripts/test_check_links.py:
    • Added unit test suite covering table header autolinks, mailto autolinks, multiple autolinks in table cells, code fences/spans stripping, pointy bracket destinations, and valid/broken link handling.
  • .github/workflows/validate.yml:
    • Registered scripts/test_check_links.py in CI workflow.

Verification

  • python3 scripts/test_check_links.py (8 tests passed, 0 failed)
  • python3 scripts/validate-skills.py (all skills and manifests valid)
  • python3 scripts/check-links.py (2932 relative links across 642 markdown files verified, 0 broken)
  • python3 scripts/check-test-suites-covered.py (all 45 test suites verified)
  • npx --yes markdownlint-cli2@0.22.1 (0 errors across 711 files)
  • Conducted adversarial self-review with clean verdict (Reviewed-Commit: 3a20741).

Recognize CommonMark autolinks (<https://...>, <mailto:...>) in markdown files,
including inside table header cells, and skip them as external links.

- Add AUTOLINK regex to scripts/check-links.py and deduplicate against inline links
- Add unit tests in scripts/test_check_links.py
- Gate scripts/test_check_links.py in .github/workflows/validate.yml
@d-morrison

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Claude review skipped — API credential or quota unavailable. No CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY secret is configured, or account API quota is exhausted. Re-trigger the review by pushing a new commit or re-running the workflow once configured/reset. View run

@d-morrison

Copy link
Copy Markdown
Collaborator Author

Superseded by merged #2843 and #2839.

@d-morrison d-morrison closed this Sep 1, 2026
@d-morrison
d-morrison deleted the fix/issue-2509-table-header-autolinks branch September 1, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant