On Mon, Aug 24, 2009 at 10:46:33PM +0100, Hans wrote: > Monday, August 24, 2009, 10:30:00 PM, Patrick wrote: > > > Of course, a function being run from within the markup engine > > cannot reliably disable markups that have already been processed. > > That would have to be done before markup processing begins. > > Well, that would be the case (markup expression or directive). > I assume that a call to MarkupToHTML() would engage the markup engine > fresh on the text passed on, deliver the HTML, which then can be > preserved with Keep(). But how can I influence the ruleset > at this stge?
Ahhh, I see part of the problem. The call to BuildMarkupRules() is currently made only once at the start of the markup processing loop (line 1498 of pmwiki.php). So once we've entered processing, any changes to the markup rules don't have any effect. I think we should move the call to BuildMarkupRules to just before the foreach() statement on line 1506. Then any markup rule can make a call to DisableMarkup() or add a new markup rule and restart text processing by calling PRR(). This still doesn't help if the rule to be disabled occurs earlier in the sequence than the rule that is doing the disabling, but it is more in line with what I expect should happen. Would it be sufficient for your needs, or do we really need something else here also? Perhaps you could explain what you're wanting to disable in a little more detail? Pm _______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel