[pmwiki-users] nested-if in beta67
adam overton
a at plus1plus1plus.org
Mon Aug 18 17:45:50 CDT 2008
(my apologies for the delay in responding to such a nice fix. i've
been away for a week)
many thanks. this seems to do the trick; so far so good, not seeing
any errors anywhere on the site (!)
will this be added to the core, or will i need to leave it in my
config for good?
thanks!
adam
On 10 Aug 2008, at 9:12 AM, Patrick R. Michaud wrote:
> On Wed, Aug 06, 2008 at 09:42:24PM -0700, adam overton wrote:
>>
>> ahhh. it appears that the newer version of nested if only accepts
>> if- followed
>> by a number, but not by a letter (the original nested-if does
>> both). so:
>>
>> doesn't work:
>> (:ifM false:)testing2(:elseM:)(:ifG true:)G true(:ifGend:)(:ifMend:)
>>
>> does work:
>> (:if0 false:)testing2(:else0:)(:if1 true:)G true(:if1end:)(:if0end:)
>>
>>
>> i've a bunch of code that currently uses letter-if's; does anyone
>> know of an
>> easy way to modify the new if-code in stdmarkup.php? i'm having
>> trouble
>> wrapping my brain around how to do that...
>
> Try (in local/config.php):
>
> $CondTextPattern =
> "/ \\(:if (\d*|[A-Z]) (?:end)? \\b[^\n]*?:\\)
> .*?
> (?: \\(: (?:if\\1|if\\1end) \\s* :\\)
> | (?=\\(:(?:if\\1|if\\1end)\\b[^\n]*?:\\) | $)
> )
> /seix";
>
> This allows either a sequence of digits or an uppercase letter to work
> as an (:if:) identifier.
>
> Pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080818/d80e3536/attachment.html
More information about the pmwiki-users
mailing list