[pmwiki-devel] disabling and modifying markup for specific recipe output
Peter Bowers
pbowers at pobox.com
Mon Aug 24 15:03:52 CDT 2009
On Mon, Aug 24, 2009 at 3:28 PM, Hans<design5 at softflow.co.uk> wrote:
> I wonder how a recipe can disable or modify specific markup for
> its own HTML output, without affecting the rest of a page.
>
> The recipe shall process some text, then return it with something like
>
> return Keep(MarkupToHTML($pagename, $text));
>
> But I'd like to have some control over various markup renderings,
> and calling Markup() or DisableMarkup() from within the recipe
> function does not have an effect.
This is undoubtedly the long & complicated way to do this, but
cookbook/Toolbox has a function called RunMarkupRules(). You could
traverse $MarkupTable creating a new array containing indices for
everything except what you are wanting to get and then use
RunMarkupRules()...
The advantage of this is that you wouldn't have to worry about
re-activating those rules after your recipe has concluded...
-Peter
More information about the pmwiki-devel
mailing list