[valadoc] Fix support for images



commit 78d8401086823d626dc735ed5153a356ba7accd4
Author: Florian Brosch <flo brosch gmail com>
Date:   Sat Oct 17 02:13:16 2009 +0200

    Fix support for images

 src/doclets/htmlhelpers/doclet/htmlrenderer.vala |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/doclets/htmlhelpers/doclet/htmlrenderer.vala b/src/doclets/htmlhelpers/doclet/htmlrenderer.vala
index 7d8afe8..8178062 100755
--- a/src/doclets/htmlhelpers/doclet/htmlrenderer.vala
+++ b/src/doclets/htmlhelpers/doclet/htmlrenderer.vala
@@ -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) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]