This folder is a runnable guide to <embed-code> instructions. The positive
examples show supported features, and the negative examples show failures users
should expect when an instruction is malformed or stale.
Run the positive examples from the repository root:
go run ./main.go -mode=check -config-path=showcase/embedding/embed-code.yml- instruction-tag.md explains managed code fences, supported tag forms, attributes, and source selection rules.
- whole-file-source.md embeds a complete source file.
- named-source-root.md
selects one configured source tree with
$name/.
- source-line-pattern.md
embeds the first source line that matches a
linepattern. - start-end-pattern.md
embeds an inclusive source range selected by
startandend. - multi-line-pattern.md
uses
\nto match consecutive source lines. - pattern-escaping.md shows how to match literal glob characters.
- named-fragment.md
embeds a region wrapped with
#docfragmentand#enddocfragmentmarkers. - multi-part-fragment-separator.md joins repeated fragment parts with the configured separator.
- overlapping-fragments.md shows fragment markers that share source lines.
- comment-filtering.md
compares
commentsmodes and lists language support. - markdown-fence-shielding.md shows that instruction-looking text inside ordinary code fences is inert.
- html-showcase.html shows that HTML documents can be processed when include patterns allow them.
The negative examples are intentionally broken and should fail. Use them to recognize common diagnostics:
go run ./main.go -mode=check -config-path=showcase/embedding/negative/processing-errors.yml
go run ./main.go -mode=check -config-path=showcase/embedding/negative/stale.ymlThe cases live in negative/docs.