[pmwiki-users] Re: Re: Re: Cookbook recipes updated for beta 19 compatibility

chr at home.se chr at home.se
Fri Jan 28 10:53:39 CST 2005


On Fri, 28 Jan 2005, Patrick R. Michaud wrote:

> Better might be:
> 
>   function DisableMarkup($markups) {
>     global $MarkupTable, $MarkupRules;
>     foreach ((array)$markups as $m) 
>       $MarkupTable[$m] = array('cmd'=>'none');
>     unset($MarkupRules);
>   }
> 
> Differences:
...
>   - DisableMarkup seems more descriptive than PreventMarkup

Agreed.

> I'll go ahead and add this function to the default distribution.

Nice.

> > >Hmm... when I think about it... what about being able to disable markup 
> > >through markup? What if by adding the following to a wiki page
> > >	(:prevent-markup ^!:)
> > >would disable that markup for that page?  (This might be a can of worms of 
> > >course..)
> 
> Someone could certainly try it.  In addition to calling DisableMarkup,
> the directive would need to call PRR(), BuildMarkupRules(), and set
> the value of $markrules in the MarkupToHTML script.

Yes, it should be (:disable-markup ^!:) instead of course...

> Plus it's interesting to speculation on what would happen with
> 
>    (:prevent-markup prevent-markup:)

I see no problem with that actually, should just mean that:

	(:disable-markup disable-markup:)
	(:disable-markup ^!:)

Results in "(:disable-markup ^!:)" being displayed instead of disabling 
'^!'.

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list