Zettelmarkup: Inline-mode Transclusion

Inline-mode transclusion is applied to any zettel that is parsed in a non-trivial way, such as when the content is structured text. For instance, this applies to zettel written in Zettelmarkup or Markdown.

Since this type of transclusion involves inline-structured elements, the transclusion specification must be replaced with an appropriate inline-structured content. Specifically, the transclusion specification is replaced with an inline span containing the inline-structured content.

The process begins by reading the referenced zettel. If the zettel contains other transclusions, these will be expanded recursively. If an infinite recursion is detected, the expansion is halted, and an error message replaces the transclusion specification.

The result of this (indirect) transclusion is searched for inline-structured elements.

If no inline-structured elements are found, the transclude specification is replaced by an error message.

To avoid an exploding “transclusion bomb”, a form of billion laughs attack (also known as “XML bomb”), the total number of transclusions / expansions is limited. The limit can be controlled by setting the value max-transclusions of the runtime configuration zettel.

See also

Full transclusion does not work inside some text, but is used for block-structured elements.