fix(drawio): keep import command reference in sync (#109)

This commit is contained in:
Cathryn Lavery
2026-08-18 12:38:57 -05:00
committed by GitHub
parent 7942fa0227
commit 0947fdb6e5
7 changed files with 83 additions and 5 deletions
+10
View File
@@ -341,6 +341,16 @@ def check_security_and_limits(tmp: Path) -> None:
def check_docs() -> None:
import_text = IMPORT_REF.read_text(encoding="utf-8")
expected_slash_command = f"/diagram-design:{COMMAND.stem}"
documented_slash_commands = set(
re.findall(r"`(/diagram-design:[a-z0-9-]+)`", import_text)
)
if documented_slash_commands != {expected_slash_command}:
rendered = ", ".join(sorted(documented_slash_commands)) or "none"
fail(
"import-drawio.md slash command does not match "
f"{COMMAND.name}: expected {expected_slash_command}, found {rendered}"
)
for needle in (
"drawio_extract.py",
"output-spec.md",