Browse Source

= Text::Dokuwiki::Render->img

master
Alex 'AdUser' Z 10 years ago
parent
commit
187b4e2b6c
  1. 5
      lib/Text/Dokuwiki/Render/Markdown.pm

5
lib/Text/Dokuwiki/Render/Markdown.pm

@ -67,9 +67,10 @@ sub p {
sub img { sub img {
my ($self, $attrs, $content) = @_; my ($self, $attrs, $content) = @_;
my $title = ($attrs->{title}) ? qq( $attrs->{title}) : ""; my $title = ($attrs->{title}) ? qq( "$attrs->{title}") : "";
my $alt = $attrs->{alt} || $attrs->{title} || '';
return sprintf("![%s](%s%s)", $attrs->{alt} // '', $attrs->{src}, $title); return sprintf("![%s](%s%s)", $alt, $attrs->{src}, $title);
} }
1; 1;

Loading…
Cancel
Save