<div>I agree this is unexpected after playing around with it.</div><div><br><div>See <a href="http://pmwiki.org/wiki/Test/IfNested">http://pmwiki.org/wiki/Test/IfNested</a>  and <a href="http://pmwiki.org/wiki/PmWiki/ConditionalMarkup">http://pmwiki.org/wiki/PmWiki/ConditionalMarkup</a></div>
<div><br></div><div>It is worth noting though that PmWiki does not do a lot of recursive descent parsing of expressions, hence the need to &#39;name&#39; DIVs when nesting them.</div><div><br></div><div>It looks to me like the ELSE is being associated (incorrectly) with the first IF rather than the second one as your examples and tests show.</div>
<div><br></div><div>I am puzzled why we can&#39;t name IFs (as we can DIVs) to get the effect you want.</div><div><br></div><div>To solve your problem I suggest you look at multiple condition IFs</div><div><br></div><div>
Simon</div><div><br></div><div><br></div><div><br><div class="gmail_quote">2009/6/20 DaveG <span dir="ltr">&lt;<a href="mailto:pmwiki@solidgone.com">pmwiki@solidgone.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
After 4 hours debugging I discovered what I think is a bug if the<br>
conditional logic. Or perhaps nested conditions work differently to how<br>
I&#39;d expect -- if so, how do I accomplish .<br>
<br>
(this was tested on <a href="http://pmwiki.org" target="_blank">pmwiki.org</a>)<br>
<br>
This markup:<br>
    (:if equal 1 2:)111(:if equal 2 3:)222(:else:)333(:if:)444(:if:)<br>
<br>
produces: 333444<br>
expected: no output<br>
odd: 444 is shown, but 111 is not<br>
<br>
This case:<br>
    (:if equal 1 2:)111(:if equal 2<br>
3:)222(:else:)333(:if:)444(:else:)555(:if:)<br>
<br>
produces: 333444(:else:)555<br>
expected: 555<br>
odd: 444 is shown, but 111 is not<br>
<br>
Which seems to indicate nested else conditional markup is simply<br>
ignored, or that the 444 is throwing things off. However this also<br>
doesn&#39;t work:<br>
    (:if equal 1 2:)111(:if equal 2<br>
3:)222(:else:)333(:endif:)(:else:)555(:endif:)<br>
<br>
produces: 333(:endif:)<br>
expected: 555<br>
<br>
  ~ ~ Dave<br>
<br>
_______________________________________________<br></blockquote></div>
</div></div>