Zettelmarkup: Inline Transclusion of Text

00001007040324 · Info · (manual) · #manual #zettelmarkup #zettelstore

Inline transclusion applies to all zettel that are parsed in an non-trivial way. For example, textual content is assumed if the syntax of a zettel is zmk (Zettelmarkup), or markdown / md (Markdown).

Since the transclusion is at the level of inline-structured elements, the transclude specification must be replaced with some inline-structured elements.

First, the referenced zettel is read. If it contains inline transclusions, these will be expanded, recursively. When an endless recursion is detected, expansion does not take place. Instead an error message replaces the transclude 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 a 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.