Documentation
¶
Overview ¶
Package ipmtmeta defines the ipmt processing-pipeline flag vocabulary and the `# ipmt:` first-line pragma, and reconciles the two carriers of that metadata:
- a ```ipmt fence info-string ("```ipmt unresolved" → ["unresolved"]), extracted by pkg/markdown.FenceMeta; and
- a `# ipmt:` first-non-empty-line comment inside the ipmt source, which is the ONLY channel available to standalone .ipmt files and <!-- ipm-include --> blocks (they have no fence).
The flags select how the block is PROCESSED (solver, embed). The negative- example `invalid` case is deliberately NOT a flag here — it is a separate fence language (```ipmt-invalid), skipped by every render tool.
Strictness (the design takes no backward-compatibility burden — tools and files upgrade together):
- the pragma is valid ONLY on the first non-empty line; a pragma-shaped line anywhere else is an error (no silently-dead pragmas);
- an unknown/malformed flag token (from the fence OR the pragma) is an error, not silently ignored.
Index ¶
Constants ¶
const ( FlagUnresolved = "unresolved" FlagDefaults = "defaults" FlagEmbedFalse = "embed=false" )
Flag tokens. Bare tokens plus the one key=value token embed=false. `draft` (the lenient-authoring mode) is reserved but NOT registered until the mode ships — today it is rejected like any other unknown flag.
Variables ¶
This section is empty.
Functions ¶
func EffectiveMeta ¶
EffectiveMeta returns the validated, de-duplicated union of the fence-info tokens and the content pragma tokens (fence order first, then pragma). An unknown token from either source is an error.
func MetaFromContent ¶
MetaFromContent extracts and validates the `# ipmt:` pragma tokens from ipmt source. It returns nil when there is no pragma. It errors if a pragma-shaped line is not the first non-empty line, or carries an unknown flag.
Types ¶
This section is empty.