Skip to content

Commit 4c007ff

Browse files
sbryngelsonclaude
andcommitted
Fix @ref/@page regex to support hyphenated IDs
The \w+ pattern stopped at hyphens, so @page getting-started was extracted as "getting" and @ref cli-reference as "cli". Use [\w-]+ to match the full hyphenated identifiers. Re-add cli-reference to the auto-generated page ID set (file only exists after doc build). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8baccbe commit 4c007ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

toolchain/mfc/lint_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def check_page_refs(repo_root: Path) -> list[str]:
370370

371371
# Collect all @page identifiers (IDs may contain hyphens)
372372
# Include Doxygen built-ins and auto-generated pages (created by ./mfc.sh generate)
373-
page_ids = {"citelist", "parameters", "case_constraints", "physics_constraints", "examples"}
373+
page_ids = {"citelist", "parameters", "case_constraints", "physics_constraints", "examples", "cli-reference"}
374374
for md_file in doc_dir.glob("*.md"):
375375
text = md_file.read_text(encoding="utf-8")
376376
m = re.search(r"^\s*@page\s+([\w-]+)", text, flags=re.MULTILINE)

0 commit comments

Comments
 (0)