aboutsummaryrefslogtreecommitdiff
path: root/src/html.rs
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
commit9f39f5cc6e60ceb65bfd270a4f39ce2dd906f7c3 (patch)
tree39af607901a5c000e80be6fe35239164865797ab /src/html.rs
parentchore: move development shell to just (diff)
downloadseptember-9f39f5cc6e60ceb65bfd270a4f39ce2dd906f7c3.tar.xz
september-9f39f5cc6e60ceb65bfd270a4f39ce2dd906f7c3.zip
fix(html): render pre as basic text
Diffstat (limited to 'src/html.rs')
-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 => {}
}