Wikidot uses (due to historical merging of various ideas) inconsistent syntax for passing arguments to tools (modules and tools like include, image, etc.). There are at least three syntaxes for passing arguments: unnamed (e.g. [[image filename]]), named without delimiters (e.g. [[include filename argument = value | argument = value]]) and named with delimiters (e.g. [[module ListPages category="*"]]).
As well as being inconsistent, argument values are limited in important ways: they cannot contain special characters like quotes, they cannot run over multiple lines, etc.
The goal of this design sketch is to define a single consistent syntax for arguments that can be used in new tools. It works as follows:
The character "\" is used to escape single characters inside the string value. To pass the backslash, we use two backslashes. All characters can be escaped.
To pass a block value the tool must use closures, i.e. a closing tag that matches the opening tag. Between the opening and closing tag, we have a body that may provide templating for tools like ListPages.
We pass a block value within the tool body as follows:
[[opening tag]]
==== name
value
====
[[closing tag]]
The closing marker '====' is optional when the block ends with another value, or at the closing tag. Here is an example of ListPages using this style (and the new header/footer arguments defined in design:12:
[[module ListPages]]
==== header
[[table style="border: 1px solid #000"]]
==== footer
[[/table]]
[[/module]]