[pmwiki-devel] markup rule execution order

John Rankin john.rankin at affinity.co.nz
Tue Nov 30 16:42:08 CST 2010


I have a situation which may be a bug in the markup rule execution order 
or just my lack of understanding.

This is the config.php structure:

if ($format=='pdf') Markup('cite', 'inline', ...);

...

Markup('cite', 'inline', ...);

...

if ($format=='pdf') Markup('bibliocite', '<cite', ...);

The third rule is optional and only loads under some circumstances, when 
we want to override the normal behaviour. Without the third item, the 
first two rules behave as expected -- we get the first rule if the 
format is pdf, otherwise we get the second.

The problem is that the third rule is not executing -- I get the result 
of the first rule. If I comment out the first rule, the third rule 
works. If I move the third rule so that it falls between the first two, 
it works. As written, it doesn't work. If I change the third rule to:

if ($format=='pdf) Markup('bibliocite', '<inline', ...);

it still doesn't work. I can see it using ?action=diag&format=pdf and it 
looks right.

I can probably find a way around this, but can someone explain it?

Thanks

-- 
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
M 021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz




More information about the pmwiki-devel mailing list