X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/523650d9c2b876152aaa9bc6c5d6363377ea7008..3f520da78aeda38e47b43b28023b52f321f71291:/IkiWiki/Plugin/img.pm diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 5c580c03c..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)); @@ -119,10 +119,11 @@ sub preprocess (@) { } my $imgtag=''.(exists $params{alt} ? $params{alt} : '').
 		'';