[Pmwiki-users] creating own markups

Patrick R. Michaud pmichaud
Wed Oct 20 13:57:22 CDT 2004


On Wed, Oct 20, 2004 at 08:38:46PM +0200, Knut Alboldt wrote:
> I try to define an own markup in a script I included in config.php. The 
> markup should replace lines like
> "> text in a line"
> into
> "<div class='myclass'>text in a line</div>"
> I tried this with:
> 	Markup('^>','inline','/^>(.*)$/','<div 
> 	class=\'pagefield\'>$1</div>');
> and
> 	Markup('^>','block','/^>(.*)$/','<:block><div 
> 	class=\'pagefield\'>$1</div>');
> but no translation takes place.

By the time the markup engine is handling the text, all of the '<'
and '>' have already been converted to '&lt;' and '&gt;'.  So what 
you really want is

    Markup('^>','inline','/^&gt;(.*)$/',
      '<:block><div class=\'pagefield\'>$1</div>');

Pm



More information about the pmwiki-users mailing list