[pmwiki-users] markup to markup question
Frank Graffagnino
frankie at graffagnino.net
Sat Aug 25 19:13:38 CDT 2007
awesome... i think the PRR might be the crucial part i was missing...
thanks!
FG
On 8/25/07, Dominique Faure <dominique.faure at gmail.com> wrote:
> On 8/25/07, Frank Graffagnino <frankie at graffagnino.net> wrote:
> > > Message: 2
> > > Date: Thu, 23 Aug 2007 08:52:38 +0200
> > > From: "Christophe David" <pmwiki at christophedavid.org>
> > > Subject: Re: [pmwiki-users] markup to markup question
> > > To: "Peter Kay" <petya_98 at yahoo.com>
> > > Cc: PmWiki Users <pmwiki-users at pmichaud.com>
> > > Message-ID:
> > > <447cbad00708222352o7534f375s24bf60de1a4be9cd at mail.gmail.com>
> > > Content-Type: text/plain; charset=ISO-8859-1
> > >
> > > > ISTR there is some way to specify where your custom markup ((:foo:))
> > > > should be interpreted in the hierarchy of other markup. Basically, you
> > >
> > > See http://www.pmwiki.org/wiki/PmWiki/CustomMarkup .
> > >
> > > You probably need to use a different $when so that one markup is
> > > processed before the other.
> > >
> > > Christophe
> > >
> > actually, I tried lots of combinations of the $when parameters,
> > including "_begin" and "<_begin". When I did this, the ">>code<<"
> > markup was still not getting interpreted correctly - it was showing
> > up in the page as text instead of formatting the following block.
> > maybe i didn't hit the exact right choice out of the ones i tried.
> >
> > can somebody show me a working example where (:foo box2:) converts to
> >
> > (:toggle div=box2:)
> > >>id=box2 border='1px solid #999' padding=5px bgcolor=#fed<<
> > The text in this section can be hidden/shown
> > >><<
> >
> > and the style is applied in the page??
> >
>
> The trick is (simply) to mimic what the (:include ...:) does:
>
> Markup('foo', '>if',
> '/\\(:foo\\s+(\\S.*?):\\)/ei',
> "PRR(FooMarkup(PSS('$1')))");
>
> function FooMarkup($name) {
> return PVSE("
> (:toggle div=$name:)
> >>id=$name border='1px solid #999' padding=5px bgcolor=#fed<<
> The text in this section can be hidden/shown
> >><<
> "));
> }
>
> Hope this help.
> --
> Dominique
>
More information about the pmwiki-users
mailing list