]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix support for images
authorFlorian Brosch <flo.brosch@gmail.com>
Sat, 17 Oct 2009 00:13:16 +0000 (02:13 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Sat, 17 Oct 2009 00:13:16 +0000 (02:13 +0200)
src/doclets/htmlhelpers/doclet/htmlrenderer.vala

index 7d8afe88d3f4cfa20dba2195204abe278d1e4675..8178062dcba6200c3403819711642dc896d1c192 100755 (executable)
@@ -160,9 +160,11 @@ public class Valadoc.Html.HtmlRenderer : ContentRenderer {
 
        public override void visit_embedded (Embedded element) {
                var caption = element.caption;
-               _stream.printf ("<img src=\"%s\">%s</a>",
-                               element.url,
-                               (caption == null || caption == "") ? "" : caption);
+               if (caption == null) {
+                       _stream.printf ("<img src=\"%s\" alt=\"%s\" />", element.url);
+               } else {
+                       _stream.printf ("<img src=\"%s\" alt=\"%s\" />", element.url, caption);
+               }
        }
 
        public override void visit_headline (Headline element) {