X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6f1539320b7b2701d391c9921177b31898767bb7..c28c7846b49df31b7ac4fbda7e44c514a939e816:/IkiWiki/Plugin/img.pm?ds=sidebyside 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} : '').
 		'';