content.mask
Require a section's text to match a mask (a small, safe pattern vocabulary) or a regex.
Docking computer: Wrong port shape. No seal. Try again.
Quick reference
| Written as | Fails with | Applies to |
|---|---|---|
content. fix: opt-in | pattern-mismatch errorvalue-wrong-form errorvalue-not-given errorvalue-not-allowed errorunknown-entity error | section |
content. fix: opt-in | value-not-given errorvalue-not-allowed errorunknown-entity error | section |
Examples
content. mask
Require the section body to match a mask (a small token vocabulary compiling to a safe regex), e.g. dates or issue refs; an array of masks passes when any one matches.
A body matching the mask passes
<!-- mdv: section required content.mask="Released <date>" -->
## Release Notes## Release Notes
Released 2026-07-02✓ passes
A body missing the shape is flagged
<!-- mdv: section required content.mask="Released <date>" -->
## Release Notes## Release Notes
Released sometime in July✗ value-not-given error · line 3
Either alternative is accepted
<!-- mdv: section required content.mask=["Released <date>", "Unreleased"] -->
## Summary## Summary
Unreleased✓ passes
A body matching no alternative is flagged
<!-- mdv: section required content.mask=["Released <date>", "Unreleased"] -->
## Summary## Summary
Shipping soon✗ value-not-given error · line 3
content. pattern
Require the section body to match a regular expression (e.g. an issue reference must be present).
A body matching the regex passes
<!-- mdv: section required content.pattern=/^Status: (Draft|Final)$/m -->
## Mission Packet## Mission Packet
Status: Final✓ passes
A body that misses the regex is flagged
<!-- mdv: section required content.pattern=/^Status: (Draft|Final)$/m -->
## Mission Packet## Mission Packet
Status: Maybe✗ value-not-given error · line 3
See also: Tags & rules