fix(tools): resolve documentation links as repository paths on Windows

check_conventions.py normalized link targets with os.path.normpath, which gives backslash paths on Windows, so every link added in docs failed the doc-link check and a silent stub listed in TechnicalDebt was not found. Links are repository-relative POSIX paths, so they are normalized with posixpath.
This commit is contained in:
popcoder565
2026-10-07 15:49:03 -04:00
parent 4764e59c37
commit fb7be867c5
+2 -1
View File
@@ -1,6 +1,7 @@
import argparse
import json
import os
import posixpath
import re
import subprocess
from collections import defaultdict
@@ -186,7 +187,7 @@ def links(path, text):
if re.match(r"[a-z]+:|#", target):
continue
target = target.split("#", 1)[0].split("?", 1)[0]
result.append((target, os.path.normpath(target.lstrip("/") if target.startswith("/") else str(PurePosixPath(path).parent / target))))
result.append((target, posixpath.normpath(target.lstrip("/") if target.startswith("/") else str(PurePosixPath(path).parent / target))))
return result