# 00697: Strange compound conditional behavior

Summary: Strange compound conditional behavior
Created: 2006-03-11 21:19
Status: Closed - not a bug
Category: Bug
From: hartwork
Assigned:
Priority: 3
Version: 2.1.2
OS:

Description:
My experiences with compound conditionals
were quite strange so I wrote some test code:

### Compound conditionals

Shouln't all these 6 give One two three?:

`One (:if true || false:)two(:if:) three`
One two three
`One (:if false || true:)two(:if:) three`
One three
`One (:if [false] || [true]:)two(:if:) three`
One two three
`One (:if [false] || true:)two(:if:) three`
One two three
`One (:if false || [true]:)two(:if:) three`
One three
`One (:if [false || true]:)two(:if:) three`
One two three

### Nested conditionals

`(:if false:)(:if true:)This text should never show(:if:)(:if:)`
This text should never show

--hartwork

Some notes on the above:

• Compound conditionals require the use of "expr" or a leading bracket
• Every operator (including brackets) has to be surrounded by spaces

Thus, rewriting the above conditionals:

 ```* One (:if expr true || false:)two(:if:) three * One (:if expr false || true:)two(:if:) three * One (:if expr ( false ) || ( true ):)two(:if:) three * One (:if expr ( false ) || true:)two(:if:) three * One (:if expr false || ( true ):)two(:if:) three * One (:if [ false || true ]:)two(:if:) three ``` One two three One two three One two three One two three One two three One two three
• Nested conditionals appeared in recent 2.2beta series and require `(:if2 cond:)` to be numbered. See ConditionalMarkup for examples.