content.lead.mask

Require the first line of a section, or the document's first heading or paragraph, to match a mask.

Docking computer: Wrong port shape. No seal. Try again.

Quick reference

Examples

content.lead.mask

Require the section's first prose line (the first paragraph under the heading, skipping fences/tables/lists) to match a mask. For the document's first line (its first heading or paragraph), use content.firstLine.mask on the document directive.

A section opening with a request line passes

contract.mdv.md
<!-- mdv: section required content.lead.mask="<word|oneOf: [GET,POST,PATCH,DELETE]> <text>" -->
### Create Envelope
document.md
### Create Envelope

POST /v1/envelopes

✓ passes

A section opening with prose instead is flagged

contract.mdv.md
<!-- mdv: section required content.lead.mask="<word|oneOf: [GET,POST,PATCH,DELETE]> <text>" -->
### Create Envelope
document.md
### Create Envelope

This call makes a new envelope.

POST /v1/envelopes

✗ value-not-allowed error · line 3

A commit subject on the document line passes

contract.mdv.md
<!-- mdv: document content.firstLine.mask="<word|oneOf: [feat,fix,docs]>: <text>" -->
document.md
feat: tune orbital beacon

✓ passes

A subject without a type prefix is flagged

contract.mdv.md
<!-- mdv: document content.firstLine.mask="<word|oneOf: [feat,fix,docs]>: <text>" -->
document.md
tune orbital beacon

✗ value-not-given error · line 1

content.firstLine.mask

Require the document's subject — its first heading or paragraph, AST-selected — to match a mask. Leading HTML is skipped; a heading is read without its # markers; a document opening with a list, table, code block, or nothing recognizable stays silent.

<!-- mdv: document content.firstLine.mask="<word|oneOf: [feat,fix,docs]>: <text>" -->
feat: tune orbital beacon

On this page