[Pmwiki-users] Maybe a pmwiki bug?
Patrick R. Michaud
pmichaud
Mon Aug 23 07:39:14 CDT 2004
On Mon, Aug 23, 2004 at 04:08:19PM +1200, John Rankin wrote:
> I wanted to append a small icon after links to pages outside the wiki.
> The script avoids inserting the icon on links that use images and
> ThisPage: etc, but I have a strange problem. Any help or ideas
> would be much appreciated.
>
> The code uses a small graphic icon:
> $UrlLinkFmt =
> "<a class='url' href='\$Url'>\$LinkText" .
> "<sup><img src='$PubDirUrl/images/offsite.png' border='0' /></sup></a>";
> This works fine except when the link is at the end of a line.
> [...]
It's the "automatic floating image" code that is causing the problem.
PmWiki sees a link containing an image (indicated by '<img' in the link
HTML) at the end of the line, and so it moves the link to the front
of the line and tries to add "align=right" to the image tag (but fails because
it's missing PmWiki's "img>" sentinel).
Yes, it's arguably a bug, or at least a misfeature. I've corrected it so
that it now looks for the "img>" sentinel before moving the link, and
released this new version as pmwiki-1.0.7.
Thus far in PmWiki 2 I've been thinking to eliminate the automatic
float-left/right of images from the markup so that floating images would
have to be explicitly tagged as such...any comments or suggestions about
this?
Pm
More information about the pmwiki-users
mailing list