diff --git a/quickpeep_densedoc/src/lib.rs b/quickpeep_densedoc/src/lib.rs index 9c0274f..e4af533 100644 --- a/quickpeep_densedoc/src/lib.rs +++ b/quickpeep_densedoc/src/lib.rs @@ -313,7 +313,12 @@ impl DenseTreeBuilder { let alt = simplify_whitespace(attrs.get("alt").unwrap_or("").trim()); - self.nodes.push(DenseTree::Image { src, alt }); + // Don't actually emit an image: it's not worth the space. + // self.nodes.push(DenseTree::Image { src, alt }); + + if !alt.is_empty() { + self.nodes.push(DenseTree::Text(alt)); + } } "p" | "pre" => { // Paragraphs must have 2 preceding newlines.