Don't store images whilst raking, for now

Fixes #5
This commit is contained in:
Olivier 'reivilibre' 2022-03-28 23:17:40 +01:00
parent 5f93b68b4e
commit 61398f6153
1 changed files with 6 additions and 1 deletions

View File

@ -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.