Expand description
Document integrity validation for Markdown and SVG files.
Enforces structural invariants from the document-integrity-v1 contract:
heading hierarchy, link well-formedness, code fence language tags, GFM
table column parity, SVG structural safety, required sections, and
README drift detection.
Structs§
- DocViolation
- A single document validation violation with location and rule info.
- Drift
Result - Result of comparing an actual README against a generated one.
Functions§
- detect_
readme_ drift - Detect drift between actual and generated README content.
- validate_
code_ fences - Validate code fences — flags bare triple-backtick fences without a language tag.
- validate_
document - Dispatch to md or svg validator based on file extension.
- validate_
heading_ hierarchy - Validate heading hierarchy: first heading is H1, exactly one H1, no level skips.
- validate_
links - Validate
[text](url)andlinks for empty URLs,javascript:scheme, and spaces. - validate_
required_ sections - Check that each required section name appears as a heading. Returns missing names.
- validate_
svg - Validate SVG structural safety (string-based, no XML parser).
- validate_
tables - Validate GFM tables — checks column count consistency across header, separator, and rows.