[pmwiki-users] Attach Icons and unexpected "'"

Patrick R. Michaud pmichaud at pobox.com
Thu Sep 13 07:29:09 CDT 2007


On Thu, Sep 13, 2007 at 12:56:40PM +0100, Graham Archer - EMEA Sun Center Operations wrote:
>    Hi,
> 
>    Trying to get:
> 
>    Markup('attachicon', '<links'
>       "/\\bAttach:[^\\s$UrlExcludeChars]*\\.(mov|doc|xls)/",
>        'http://localhost/wiki3nov/pub/icons/$2.png $0');
> 
>    to work as shown in http://www.pmwiki.org/wiki/Cookbook/AttachIcons

There's a comma missing after '<links' .

Also, the recipe appears to be incorrectly using a $2 in the last 
line -- it probably needs to be $1 (as the pattern only has
one set of parens).  Thus you might try:

  Markup('attachicon', '<links',
     "/\\bAttach:[^\\s$UrlExcludeChars]*\\.(mov|doc|xls)/",
    'http://localhost/wiki3nov/pub/icons/$1.png $0');

Pm




More information about the pmwiki-users mailing list