mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
docs: repair spellcheck and anchor drift (#122960)
* docs: repair spellcheck and anchor drift * docs: satisfy markdown anchor lint
This commit is contained in:
committed by
GitHub
parent
2c3e537cb8
commit
e45a9460ce
@@ -15,3 +15,4 @@ wit
|
||||
allowIn
|
||||
planText
|
||||
nwe
|
||||
smoe
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user