X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/5c14c7db615bc06324c3801088d05c06c8824b16..b23ddf6c4a955dc4da8266880d27e25073ee7e06:/IkiWiki/Plugin/img.pm diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index d295b833b..44d67bd83 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -43,7 +43,7 @@ sub preprocess (@) { return ''; } - push @{$links{$params{page}}}, $image; + add_link($params{page}, $image); # optimisation: detect scan mode, and avoid generating the image if (! defined wantarray) { return; @@ -66,7 +66,7 @@ sub preprocess (@) { if ($params{size} ne 'full') { my ($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/); - error sprintf(gettext('bad size "%s"'), $params{size}) + error sprintf(gettext('wrong size format "%s" (should be WxH)'), $params{size}) unless (defined $w && defined $h && (length $w || length $h)); @@ -121,8 +121,9 @@ sub preprocess (@) { my $imgtag=''.$params{alt}.'';