[pmwiki-users] Markup sequence question
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Tue Feb 20 09:05:28 CST 2007
Strangely when I do:
Markup('staffbox','<directives','/\(:staffbox\\s+(.*?)\\s?:\)/',
">>yellowbox<<somestuffand$1otherstuff$1>><<");
replacing the ">>yellowbox<<" with ">>yellowbox<<"
It find and process the first Markup ">>yellowbox<<" but not the last one ">><<" which closes the div. This is certainly because
there is no apparent newline so that ">><<" is recognized to be at the beginning of a new line.
How can I add a newline at the end of the string? I tried "(:divend:)", "\n" and <br> but this doesn't work.
I don't use Keep() because I certainly don't want PmWiki to "Keep" it as it is but, to the contrary, to "process" it as a bunch of
markup.
Thanks,
Pierre
>-----Message d'origine-----
>De : Hans [mailto:design5 at softflow.co.uk]
>Envoyé : 16 février 2007 18:18
>À : Pierre Racine
>Cc : pmwiki-users at pmichaud.com
>Objet : Re: [pmwiki-users] Markup sequence question
>
>Friday, February 16, 2007, 10:27:36 PM, Pierre wrote:
>
>> How can I make a custom markup so that the result content
>> ">>yellowbox<<" and will be further
>processed by the >>><< markup.
>
>> I tried:
>
>> Markup('staffbox','<directives','/\(:staffbox\\s+(.*?)\\s?:\)/',
>">>>yellowbox<<somestuffand$1otherstuff$1>><<");
>
>perhaps you can try using the Keep and PSS function and HTML,
>with the /e option:
>
>Markup('staffbox','directives','/\\(:staffbox\\s(.*?):\\)/e',
>"Keep('<div
>class=yellowbox>somestuffand'.PSS($1).'otherstuff'.PSS($1).'</div>')");
>
>
>Hans
>
More information about the pmwiki-users
mailing list