[pmwiki-users] including wiki markup within custom markup

huw walters huw.walters at mail.com
Mon Mar 5 07:57:11 CST 2007


Hi 

I am trying to create a markup compatible with the 'showhide' recipe (http://www.pmwiki.org/wiki/Cookbook/ShowHide). If the markup is possible, it would make the recipe even more useful, as it would hide the code and so your wiki would look less complicated to edit.... 

My question, however, is more specifically related to the email's subject - including wiki markup within custom markup.

Ideally I would like to make it so that !!Abc would do the same as:
 
(:divend:)
!!Abc (:showhide ... :)
(:div id=Abc:)


I suspect that this might be problematic because the markup !! already exists. So for the moment I trying it out with the markup o!!Abc!!o

What I have done is:

Markup('^!new', 'split',
  "/o!!(.*?)!!o/",
  "(:divend:)
<br><br>
!!$1
<br><br>
(:showhide init=hide div=$1 lshow='Show Content' lhide='hide Content':)
<br><br>
(:div id=$1:)" );


I do not understand the '$when' parameter but when set to 'split': '(:divend:)' works as does '(:showhide ...:)' However '!!' does not work; neither does (:div id=$1:) - all it does is print out the relevant values i.e. !!Abc and (:div id=Abc:).

So my question is; why do only some wiki markups work within custom markups. And might it be possible to create a markup like this for !!Abc (where it doesn't necessarily need to do the same for !!!Abc)?

Thanks very much,

Huw

=




More information about the pmwiki-users mailing list