Skip to content

Commit 70dae6e

Browse files
committed
Don't emit empty alt.
1 parent 474bd31 commit 70dae6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/markup/to_html.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def handle_RDOCLINK url # :nodoc:
9999
gen_url CGI.escapeHTML(url), CGI.escapeHTML(text)
100100
when /^rdoc-image:/
101101
url, alt = $'.split(":", 2) # Split the string after "rdoc-image:" into url and alt
102-
if alt
102+
if alt && !alt.empty?
103103
%[<img src="#{CGI.escapeHTML(url)}" alt="#{CGI.escapeHTML(alt)}">]
104104
else
105105
%[<img src="#{CGI.escapeHTML(url)}">]

0 commit comments

Comments
 (0)