You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

966 B

Depth

Select blocks can contain any element type inside, just like most blocks. They, however, only apply their select-checking to immediate children. This prevents things like loops with conditionals inside of them.

Early termination

Comparisons are done in-order and only the first matching comparison (eq/ne/gt/gte/lt/lte) is evaluated. All other non-comparison elements inside the select tag are still rendered normally.

Matching is terminated even if the first matching comparison has its own key.

Else blocks are rendered until the first matching comparison but else blocks after that are not rendered.

Default vs none

Default was deprecated as of dust 1.6.0 and no longer does anything. It was deprecated because it was essentially the same as none except that there could only be one per select block and it had to be placed after all the other conditions to make sure they were all false. None is more flexible.