[Pmwiki-users] forcing line-continuation by directive (v2)

Knut Alboldt pmwiki
Fri Nov 12 07:14:54 CST 2004


is it possible to force a line continuation within a directive ?
sample:

pagetext:
------
fielda:: valuea

fieldb:: valueb

fieldc:: valuec
------

I defined a markup:

   Markup('pagefield','block','/^([\w\s-]+)::(.*)$/','<:block><div 
class=\'pagefield\'>$1: $2</div>');


which marks all line like "name :: value" as a <div class='pagefield'> line.
It gets parsed as:

<p class='vspace'></p><div class='pagefield'>fielda: valuea</div>
<p class='vspace'><div class='pagefield'>fieldb: valueb</div>
<p class='vspace'><div class='pagefield'>fieldc: valuec</div>

Now I want that a following (empty, if possible) line is joined withthe 
preceeding "div"-line so that the page-text will get parsed as:

<div class='pagefield'>fielda: valuea</div>
<div class='pagefield'>fieldb: valueb</div>
<div class='pagefield'>fieldc: valuec</div>

Tried this by defining

   Markup('pagefield','<\$','/^([\w\s-]+)::(.*)$/','<:block><div 
class=\'pagefield\'>$1: $2</div>\\');

additional \ at the end to be processed before "\$", but it didn't work.

Any help for that ?

Knut




More information about the pmwiki-users mailing list