With the macro boringtable
defined as:
|cell one|cell two|
|cell three|cell four|
then
wiki text | renders as | |||||
---|---|---|---|---|---|---|
1 |
|
| ||||
2 |
|
| ||||
3 |
|
| ||||
4 |
|
| ||||
5 |
|
|
The list syntax is recognised in block mode and the enclosed contents are parsed using inline mode. When the parser encounters a wikitext macro call it will use the current parse mode to parse the contents of the macro. The contents of the macro contains table syntax which is only recognised in block mode.
Therefore, in #1 above the table syntax is not recognised. In #2 above, the blank line after the open div
tag moves the parser back into block mode, the macro call inherits it and the table is recognised.
When calling macros using the widget, the parse mode will be inline (#3 and #4 above) unless it is written as an open tag with a following blank line (#5 above).
These examples have slightly different behavior. In the previous section, the macro calls were enclosed within list items. In these examples, the macro calls are at the top level:
wiki text | renders as | |||||
---|---|---|---|---|---|---|
1 |
|
| ||||
2 |
|
| ||||
3 |
| |cell one|cell two| |cell three|cell four| | ||||
4 |
| |cell one|cell two| |cell three|cell four| | ||||
5 |
|
|
Of these examples, only the two $macrocall
tags which are not followed by a blank line are parsed using inline mode.