dynamic expressions inside markdown or similar document formats
here is an example of an extendable syntax for structured documents. it includes forms that can be evaluated by custom procedures to notate things like lists, tables and more.
it is compatible with other formats like markdown and offers dynamic expression types that allow using plaintext or nested dynamic expressions either inline, for the current line, or for the current block.
a template processor compiling from this to other formats just has to parse the expressions and their arguments and then pass that to custom functions to generate suitable output in the target format.
#(identifier dynamic-expression ...)
#identifier dynamic-expression ... dynamic-expression ... ...
##(identifier plaintext/itm-expression ...)
##identifier plaintext/itm-expression ... plaintext/itm-expression ... ...
#identifier: dynamic-expressions ... ##identifier: plaintext/itm-expressions ...
###identifier plaintext ... plaintext ...
the text is passed as a parsed tree without any nested expressions evaluated. this can be used, for example, to do block escaping
a line before increased indent becomes a heading
this is a heading
this is content
and more example text
a sub-heading
more contenteach empty line, two newlines, creates one line break in the output
example text more text after empty line
inline expression prefixes, colons and backslashes can be escaped with a backslash
\: \# \## \### \\
block escapes
###
content
content
content