feat(scripts): recognize autolinks in check-links.py (Closes #2509) - #2871
Closed
d-morrison wants to merge 1 commit into
Closed
feat(scripts): recognize autolinks in check-links.py (Closes #2509)#2871d-morrison wants to merge 1 commit into
d-morrison wants to merge 1 commit into
Conversation
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
Collaborator
Author
|
/review |
Contributor
|
Warning Claude review skipped — API credential or quota unavailable. No |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2509.
Update
scripts/check-links.pyto 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:AUTOLINKregex andextract_targets()helper.[text](<url>)).is_external().check_target()helper with safe relative path formatting.scripts/test_check_links.py:.github/workflows/validate.yml:scripts/test_check_links.pyin 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)