content.scan

Scan the whole document for a mask and check every hit.

Science officer: Fascinating claim. Source?

needs sources What to pass

Quick reference

Written asFails withApplies to
content.scan=…unknown-entity errordocument

Examples

content.scan

Scan document prose for every occurrence of a mask and report captured values absent from a contract-relative |in: source, once at first occurrence.

Every scanned name is on the roster

contract.mdv.md
<!-- mdv: fragment person = (?:Captain|Ensign)\s+[A-Z][A-Za-z'-]+ -->
<!-- mdv: document content.scan="<person|in: ./roster.txt>" -->
roster.txt
Captain Reyes
Ensign Okafor
document.md
Captain Reyes ordered the relay check.

Ensign Okafor logged the result.

✓ passes

A name missing from the roster is reported once

contract.mdv.md
<!-- mdv: fragment person = (?:Captain|Ensign)\s+[A-Z][A-Za-z'-]+ -->
<!-- mdv: document content.scan="<person|in: ./roster.txt>" -->
roster.txt
Captain Reyes
Ensign Okafor
document.md
Captain Reyes ordered the relay check.

Ensign Okafro logged the result.

Ensign Okafro signed off the shift.

✗ unknown-entity error · line 3

On this page