[pmwiki-users] Different Markup definitions for a section?
aalbuquerque at lanowar.sytes.net
Mon Apr 24 16:17:35 CDT 2006
Stirling Westrup wrote:
> That won't work. I want to KEEP the existing markup when its outside the
> special section, and change it inside. Thus:
> ! This is a normal heading
> ! This is a completely different markup!
> ! This is again the normal heading markup
> So, I need to have the entire set of Markups change while handling
> special sections. Thats what I don't know how to do.
There's a way to do this but you'll need to rewrite the main PmWiki
engine to do it.
Basically, there are 3 functions and 2 variables that deal with Markups.
Markup - sets the markup to be used.
BuildMarkupRules - sorts the markups to be used.
MarkupToHTML - transforms the text saved in each page into html.
$MarkupTable - holds the markups that are saved by the Markup function
$MarkupRules - the ordered markups to be applied by MarkupToHTML.
What you need is an array of $MarkupTable. The default table would be
$MarkupTable (the current markup). Your markup would set the used
markup to another position in the array. The endmarkup would revert the
position to the default one.
This would also imply the rewrite of scripts/stdmarkups.php that sets
the default markups.
More information about the pmwiki-users