[pmwiki-users] [confluence / pmwiki ] {newwindow} versus %newwin%
Patrick R. Michaud
pmichaud at pobox.com
Thu Apr 26 10:22:59 CDT 2007
On Wed, Apr 25, 2007 at 12:27:03AM +0200, St�phane Heckel wrote:
>
> Bonsoir,
>
> The regular confluence syntax to open a link in a new window is :
> {newwindow:caption|title|width|height|scrollbars}url{newwindow}
> described here
> http://confluence.atlassian.com/display/CONFEXT/New+Window+User+Macro
>
> ie :
> {newwindow:Join the LinkedIn Network||||}http://www.linkedin.com{newwindow}
> ...
> The first tentative to convert {newwindow} to %newwin% using Markup() gives
> this :
>
> ## {newwindow:}
> Markup('{newwindow}', '<links',
> '/\\{newwindow:[^}]*\\}(.*?)\\{newwindow\\}/',
> '%newwin%[[$1]]%%');
>
> However, this version does not handle the "caption", ...
> How do I extract both "caption" and "url" from {newwindow:Join the LinkedIn
> Network||||}http://www.linkedin.com{newwindow} to generate the correct
> Markup() ?
This version should work:
Markup('{newwindow}', '<links'
'/\\{newwindow:([^|]*)[^}]*\\}(.*?)\\{newwindow\\}/',
'%newwin%[[$2|$1]]%%');
Pm
More information about the pmwiki-users
mailing list