[pmwiki-users] Markup

Brian Tibbels brian.tibbels at clickmarlow.co.uk
Wed Nov 13 17:50:08 CST 2013


Many thanks Patrick - that sorts out when it should be done but I still
don't get the desired result. I amended the markup to escape all the quotes
and PSS the return strings, so it now stands at :

Markup( "panel",
"fulltext",
"/^\\(:panel-default:\\)(.*?)^\\(:panelbody:\\)(.*?)^\\(:panelend:\\)/sie",
"Keep('<div class=\'panel panel-default\'>
  <div class=\'panel-heading\'>
    <h3 class=\'panel-title\'>'.PSS('$1').'</h3>
  </div>
  <div class=\'panel-body\'>'.PSS('$2').'</div>
</div>')"
);


Rgds Brian



*Brian Tibbels*
*IT support for small business and the individual*
http://clickmarlow.co.uk/
*m*: 07804 109906* | t*: 01628 477640



On 13 November 2013 22:17, Patrick R. Michaud <pmichaud at pobox.com> wrote:

> By the time PmWiki reaches the "block" phase of Markup rules, the
> text has already been broken into individual lines.  If you want to
> match a pattern against multiple lines of input, it needs to be
> in the "fulltext" phase, or at least "<split".
>
> Pm
>
> On Wed, Nov 13, 2013 at 09:39:48PM +0000, Brian Tibbels wrote:
> > I am trying to create a set of markups which will include Bootstrap
> > components - I thought I would start with an easy one and fell at the
> first
> > hurdle :(. I have looked at all the sample markups and some were obvious
> > and others were rather hard to follow as regular expressions are not my
> > strong point. Could someone please tell me what is wrong with this
> though...
> >
> > Markup( "panel",
> > "block",
> >
> "/^\\(:panel-default:\\)(.*?)^\\(:panelbody:\\)(.*?)^\\(:panelend:\\)/sie",
> > "<div class='panel panel-default'>
> >   <div class='panel-heading'>
> >     <h3 class='panel-title'>$1</h3>
> >   </div>
> >   <div class='panel-body'>
> >     $2
> >   </div>
> > </div>"
> > );
> >
> >
> > I was hoping to transform this sort of thing.
> >
> > (:panel-default:)
> > My Title
> > (:panelbody:)
> > Body text
> > (:panelend:)
> >
> > also if this could be transformed even better
> >
> > (:panel-default:)
> > My Table
> > (:panelbody:)
> > || class=table
> > || Col-1 || Col-2 || Col-3 ||
> > (:panelend:)
> >
> >
> > ----
> > Best wishes
> > Brian
>
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20131113/2fbaa454/attachment.html>


More information about the pmwiki-users mailing list