aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-14 10:17:24 +0000
committerFuwn <[email protected]>2024-09-14 10:17:24 +0000
commit73b541007ab850a1a5452298bee8328506a6eb56 (patch)
tree39af607901a5c000e80be6fe35239164865797ab
parentchore: move development shell to just (diff)
downloadseptember-73b541007ab850a1a5452298bee8328506a6eb56.tar.xz
september-73b541007ab850a1a5452298bee8328506a6eb56.zip
fix(html): render pre as basic text
-rw-r--r--src/html.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/html.rs b/src/html.rs
index 299242c..64ec6ae 100644
--- a/src/html.rs
+++ b/src/html.rs
@@ -255,7 +255,11 @@ pub fn from_gemini(
html.push_str(&format!("<blockquote>{}</blockquote>", safe(text)));
}
Node::PreformattedText { text, .. } => {
- html.push_str(&format!("<pre>{}</pre>", safe(text)));
+ let mut new_text = text.to_string();
+
+ new_text.pop();
+
+ html.push_str(&format!("<pre>{new_text}</pre>"));
}
Node::Whitespace => {}
}