[Pmwiki-users] creating own markups

Knut Alboldt mailing
Wed Oct 20 15:32:55 CDT 2004


At 21:57 20.10.2004, you wrote:
>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>');

Aah ! Thank you !

Knut 




More information about the pmwiki-users mailing list