Parses Wikidot's inline expression and conditional block syntax:
[[#expr expression]]
[[#if value | then | else]]
[[#ifexpr expression | then | else]]
All three forms begin with [[# followed by the keyword. The # prefix distinguishes these from regular [[block]] syntax.
[[#
#
[[block]]
[[#if]] treats its condition as a string and considers these values falsy: "false", "null", "", "0". Everything else is truthy.
[[#if]]
"false"
"null"
""
"0"
[[#ifexpr]] evaluates its condition as a mathematical expression and treats the numeric result as falsy when zero.
[[#ifexpr]]
Both conditional forms support an optional else branch: when only one pipe-separated branch is provided, the else branch is empty.
Expressions are limited to 256 characters (after trimming) to prevent abuse.
The pipe (|) delimiter is depth-aware: pipes inside nested [[]] or [[[]]] blocks are not treated as branch separators.
|
[[]]
[[[]]]
Parses Wikidot's inline expression and conditional block syntax:
[[#expr expression]]-- evaluate a mathematical expression and display the result[[#if value | then | else]]-- simple truthy/falsy conditional[[#ifexpr expression | then | else]]-- expression-based conditionalAll three forms begin with
[[#followed by the keyword. The#prefix distinguishes these from regular[[block]]syntax.[[#if]]treats its condition as a string and considers these values falsy:"false","null","","0". Everything else is truthy.[[#ifexpr]]evaluates its condition as a mathematical expression and treats the numeric result as falsy when zero.Both conditional forms support an optional else branch: when only one pipe-separated branch is provided, the else branch is empty.
Expressions are limited to 256 characters (after trimming) to prevent abuse.
The pipe (
|) delimiter is depth-aware: pipes inside nested[[]]or[[[]]]blocks are not treated as branch separators.