docs: repair spellcheck and anchor drift (#122960)

* docs: repair spellcheck and anchor drift

* docs: satisfy markdown anchor lint
This commit is contained in:
Peter Steinberger
2026-08-12 20:50:56 -07:00
committed by GitHub
parent 2c3e537cb8
commit e45a9460ce
36 changed files with 94 additions and 68 deletions
+1
View File
@@ -15,3 +15,4 @@ wit
allowIn
planText
nwe
smoe
+10
View File
@@ -608,6 +608,16 @@ export function prepareAnchorAuditDocsDir(sourceDir = DOCS_DIR) {
fs.rmSync(path.join(tempDir, entry.name), { recursive: true, force: true });
}
for (const filePath of walk(tempDir).filter((entry) => /\.mdx?$/iu.test(entry))) {
const raw = fs.readFileSync(filePath, "utf8");
const normalized = raw.replace(/<!--[\s\S]*?-->/gu, (comment) =>
comment.replace(/[^\r\n]/gu, ""),
);
if (normalized !== raw) {
fs.writeFileSync(filePath, normalized, "utf8");
}
}
const docsJsonPath = path.join(tempDir, "docs.json");
const docsConfig = JSON.parse(fs.readFileSync(docsJsonPath, "utf8"));
const sanitized = sanitizeDocsConfigForEnglishOnly(docsConfig);