[pmwiki-users] Different Markup definitions for a section?
Américo Albuquerque
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
> (:special-section:)
> ! This is a completely different markup!
> (:end-special-section:)
> ! 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.
The functions:
Markup - sets the markup to be used.
BuildMarkupRules - sorts the markups to be used.
MarkupToHTML - transforms the text saved in each page into html.
The variables:
$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[0] (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.
Américo Albuquerque
More information about the pmwiki-users
mailing list