[pmwiki-devel] disabling and modifying markup for specific recipe output

Hans design5 at softflow.co.uk
Thu Aug 27 12:27:09 CDT 2009


I like to summarise my findings:

At present it is not possible to add new markup or disable markup
from within  a function called by other markup (for instance via a
markup expression or directive).
If MarkuptoHTML() is called function BuildMarkupRules() fails to
update the markup rules.

Now I am not sure if this could be regarded as a bug. It is certainly
fixable as I outlined previously, with little effort.

If it gets fixed, it opens the possibilities of adding and disabling
markup and changing the MarkupTable from within functions.

But I also realised that disabling a markup can have consequences
beyond the desired output, for instance changing parts of the page
rendering which is processed later (I seen it in the SideBar).
So one would also need a means of re-enabling the markup after
the call to MarkupToHTML(). But function DisableMarkup() changes the
$MarkupTable in a way that will not allow easy re-enabling, and only
leaves the option of newly defining the disabled markup.

In other words: $MarkupTable and the functions dealing with it are not
set up to allow switching a markup on and off in  a simple way, and
if one wanted this feature of modifying markup for specific recipe
output, then functions need possibly be able to save markup patterns
for easy re-enabling etc.

I don't see there would be much interest in this, but I still like to
ask to make the fixes to function BuildMarkupRules(), so
DisableMarkup() and Markup() functions can be called from functions.


Hans




More information about the pmwiki-devel mailing list