Skip to main content

Crate mdtype_rules_stdlib

Crate mdtype_rules_stdlib 

Source
Expand description

Built-in body rules for mdtype.

Each rule lives in its own module and is trivially copy-pasteable as a template for new rules in downstream crates. Add new rules here or in an external crate — never in mdtype-core.

Modules§

forbid_h1
body.forbid_h1 — disallow any top-level # heading.
forbidden_sections
body.forbidden_sections — assert that named H2 headings do not appear.
required_sections
body.required_sections — assert that each named H2 heading exists.
section_order
body.section_order — assert ordering of required H2 headings.

Functions§

register_stdlib
Return the set of factories for every stdlib rule. Register these with your SchemaSource so YAML schemas may reference their rule ids.