Skip to content

Commit 8a9cc67

Browse files
committed
fix: skip code fences in link checker, fix template link in CONTRIBUTING
Made-with: Cursor
1 parent e50de44 commit 8a9cc67

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Describe which `homelab_*` MCP tools this skill uses.
108108

109109
## See Also
110110

111-
- [Related Skill](../pi-system-management/SKILL.md)
111+
- Related Skill -- link to ../related-skill/SKILL.md
112112
```
113113

114114
### Skill requirements

tests/test_internal_links.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@ def _find_markdown_files():
1717
return md_files
1818

1919

20+
def _strip_code_fences(text):
21+
"""Remove fenced code blocks so links inside them are not checked."""
22+
return re.sub(r"```[\s\S]*?```", "", text)
23+
24+
2025
@pytest.mark.parametrize("md_file", _find_markdown_files())
2126
def test_relative_links_resolve(md_file):
2227
with open(md_file, "r", encoding="utf-8") as f:
23-
text = f.read()
28+
text = _strip_code_fences(f.read())
2429

2530
links = re.findall(r"\]\((\.\./[^)]+|\.\/[^)]+)\)", text)
2631
file_dir = os.path.dirname(md_file)

0 commit comments

Comments
 (0)