template-definition-optional-placement-ambiguous
Reports optional Template boundaries that do not wrap one complete heading section.
What it does
Reports unmatched, repeated, overlapping, nested, or misplaced optional boundaries. Each pair must wrap one complete heading section and use a unique lower-case identifier.
Why it matters
Presswork needs one clear section boundary to decide which declared headings may be omitted together.
Examples
Non-passing
# {{title}}
<!-- presswork:optional-start detail -->
Text before any heading.
<!-- presswork:optional-end detail -->
Passing
# {{title}}
<!-- presswork:optional-start detail -->
## Detail
Optional authored detail.
<!-- presswork:optional-end detail -->
When it applies
This Rule belongs to the configurable document-types group. Optional boundaries are interpreted while the Template definition is compiled.
References
See Presswork Configuration for Templates and src/template.ts for optional-section boundaries.